From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: border1.nntp.ams3.giganews.com!border2.nntp.ams3.giganews.com!border2.nntp.ams2.giganews.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!feeder.erje.net!us.feeder.erje.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!peer03.iad.highwinds-media.com!news.iad.highwinds-media.com!peer03.am1!peering.am1!npeersf04.am4!fx14.fr7.POSTED!not-for-mail Message-ID: From: Mike H Reply-To: Mike Hopkins Newsgroups: comp.lang.ada Subject: Re: Pretty printing the pretty print. References: MIME-Version: 1.0 Content-Type: text/plain;charset=us-ascii;format=flowed User-Agent: Turnpike/6.07-M (<8c+$+zb077Pti5diXa8NqJs7Yt>) NNTP-Posting-Host: 83.104.138.185 X-Complaints-To: abuse@demon.net X-Trace: 1380289377 83.104.138.185 (Fri, 27 Sep 2013 13:42:57 UTC) NNTP-Posting-Date: Fri, 27 Sep 2013 13:42:57 UTC Date: Fri, 27 Sep 2013 14:25:29 +0100 X-Received-Bytes: 2647 X-Original-Bytes: 2984 Xref: number.nntp.dca.giganews.com comp.lang.ada:183487 Date: 2013-09-27T14:25:29+01:00 List-Id: In message , gautier_niouzes@hotmail.com writes >Then consider: http://notepad-plus-plus.org/ >It does a real pretty print Agreed! However, I was unable to persuade the site to download a copy onto my PC. Not that it mattered because the on-line demonstration allowed me to do all that I wanted to do for my immediate purposes. That purpose was to print some code fragments in order to explain what is meant, in Ada, by array slices, sliding and unbounded declarations. A C++ man working for a blue-chip organisation, he was impressed and also opined that Ada "seems to have a sweet syntax". During the same conversation he asked me to write some Ada code to perform an exercise question he routinely sets when interviewing programmer candidates. Thinking on the hoof I wrote some code that in hind-sight was not good Ada and certainly not what I would have written if I had time to think the matter through. I seemed to fall straight into the trap that he had set. But I say "seemed" because as soon as he pointed out the error, and we discussed it, it became obvious that the trap was a situation that, in Ada, would possibly not have compiled and if it had would certainly have had potential for raising a constraint error. I refrained from pointing out that it could be argued that it was a specification error in that the specification did not admit that the difference between two indices is not an index, it is an offset. -- Knowledge is knowing a tomato is a fruit Wisdom in knowing not to put it in the fruit salad. Mike