Re: Does this string processing work for you?




"Dan Nagle" <dannagle@xxxxxxxxxxx> wrote in message
news:f3Q_e.14660$TQ3.7362@xxxxxxxxxxx
> David Frank wrote:
>
> <snip>
>
>> No it shud be 8 for same reason that the standard dictates that a do loop
>> shall exit +1 to its do terminus count when run to completion and lots of
>> code depends on that behaviour, this just repeats that KNOWN behaviour
>
> But if a program exits from a loop prematurely, the loop index
> is the last value obtaining within the loop. Surely, that's
> the behavior you're trying to emulate.

NO, thats NOT the behavior were trying to emulate, we are emulating a normal
do loop that has successfully ended processing all available items with no
problems encountered (because we setup a known string with a built-in
terminus)..

> Unless you want to consider
> a premature end condition to be expected?
>

To re-iterate, the ERR=exit is ALWAYS taken with a intact loop index +1 to
last valid item decoded/stored,
the err is expected because we setup a known error condition at string end,
with a blank pad // char(0)



.



Relevant Pages

  • Re: Infinite Loops and Explicit Exits
    ... > CS> One of these proposals relaxes the current restriction that an EXIT ... > termination of the loop is not visible at that point. ... > terminating condition is visible in that context. ... > You now want to allow this remote procedure, ...
    (comp.lang.cobol)
  • Re: Houston-related rants was Re: forced merges/inside lane merges/AASHTO "tapered merges"
    ... >> Are you sure about the North Loop and I-45? ... >> in particular the westbound exit for Fondren/Gessner. ... How could HCTRA put an exit ramp for eastbound ... and the West Houston Center Blvd exit still shows Old Westheimer ...
    (misc.transport.road)
  • Re: Exit Do
    ... I've been instructed by a dot net / asp programmer that Exit Do is ... I am using nested loops and need to exit out of one loop into ... If Some Reason to stop loop then Exit Do ... Code Stage B ...
    (microsoft.public.scripting.vbscript)
  • Re: Exit Do
    ... I've been instructed by a dot net / asp programmer that Exit Do is ... I am using nested loops and need to exit out of one loop into ... Code Stage B ... likely to lead to bugs and readability problems. ...
    (microsoft.public.scripting.vbscript)
  • Re: Infinite Loops and Explicit Exits
    ... CS> There are cases in which EXIT PERFORM is, I think, clearer than GO TO ... procedure-name-1 SECTION. ... repetition in the main loop statement is being overrun by some minor ... particularly when the requirements of elegance ...
    (comp.lang.cobol)