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=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!eu.feeder.erje.net!news2.arglkargh.de!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Simon Clubley Newsgroups: comp.lang.ada Subject: Re: Help with an errant 'IF' statement please. Date: Sun, 30 Nov 2014 15:43:43 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <0a70a8a3-45fc-440b-999b-f9cfbc6ac7f9@googlegroups.com> <8ecc1fb7-615c-4b7e-83e3-866a830a59a5@googlegroups.com> <347cef2a-6b5e-4f38-b2ec-bb055c5060e4@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Date: Sun, 30 Nov 2014 15:43:43 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="d38432997dd5f24294aa34d172ee8096"; logging-data="13957"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19KcQ4axtmmb23LzFaqB/TjA4gi2S2SPxw=" User-Agent: slrn/0.9.9p1 (Linux) Cancel-Lock: sha1:TzGlbOiETifrGfhOift3ctbRDTE= Xref: number.nntp.giganews.com comp.lang.ada:191107 Date: 2014-11-30T15:43:43+00:00 List-Id: On 2014-11-30, Austin Obyrne wrote: > > This is the only program in several hundred where this method of > stalling the program does not work and it is only when I used this > type of loop i.e. being terminated by a 'sentinel' character that it > happens. It is not a problem in the current cipher now but I have > taken on board your advice for future - I do understand what I must do > sometime soon in the future and I may have to come back to you again - > you are saying I should create some innocuous program and try stalling > it by the same means and the reason why it won't work should surface - > I hadn't thought of that. I will be doing that asap. > > Thanks for your much appreciated help - am I right in my intentions?. > In your test program, you need to use a copy of the _actual_ small section of the code which is giving you trouble instead of re-creating it from the ground up as the purpose is to explore what the problem code is _actually_ doing instead of what you _think_ it is doing. You also need to make sure there are no variables defined which are not needed by the faulty section of code and then you look at what variables are actually needed by the faulty code as it currently stands to see if that also gives you any clues. Once you have duplicated the problem in your small test program, you can then start reducing the code further until the problem either becomes clear to you or it becomes something which you can post for further help. If you have a debugger to hand (such as gdb) you can also step through the faulty code using the debugger and examining variables and program flow as the code executes. Simon. -- Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP Microsoft: Bringing you 1980s technology to a 21st century world