For any of the newbies on this forum, there are a few things to mention
about READNEXT.

First, it is not married to or dependent upon LOOP...REPEAT. That's just one
of the popular ways it's used. I've seen and used it in different
structures.

Second, the dynamics of WHILE/UNTIL behave differently on U2 versus other
versions of MV. For example, LOOP WHILE READNEXT ID DO doesn't work on D3 or
other native systems. In those cases it needs the ELSE somewhere.

Third, you can have multiple READNEXT statements against the same active
list (numbered/referenced or not). It's not that advised but it's not wrong
either if used with prudence.

Fourth, the READNEXT ID,MV systax is available if the active list used
BY-EXP and you need the MV reference.

READNEXT is a very popular command for its obvious purpose. I wish we had
MOVEFIRST, MOVELAST or READPREVIOUS but we can accomplish these tasks using
traditional MV variables and pointers.

My 1 cent.


----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 17, 2004 4:57 AM
Subject: [U2] [UV] WHILE READNEXT id DO


> LOOP
> code
> WHILE READNEXT id DO
> more code
> REPEAT
>
> This format of the READNEXT statement is used in a couple of places in the
> UniVerse BASIC manual. It looks like READNEXT is returning a Boolean.
>
> If I look up READNEXT in the manual (or in HELP from TCL) - there is no
> mention of this format of the statement.
>
> And in the manual the THEN and ELSE are enclosed in braces: {THEN
statements
> [ELSE statements] | ELSE statements}
> which according to convention means that I have to choose one
"non-optional"
> item.
>
> Has this format of the statement just been left out of the manual by
mistake
> or is it a "new" format, that was never documented.
>
> And, what are people's thoughts on using this format. Personally I dislike
> it, as it isn't easily readable, it's not documented and it's not a
standard
> use of the statement syntax.
>
> AdrianW
>
>
>
>
> Disclaimer.  This e-mail is private and confidential. If you are not the
> intended recipient, please advise us by return e-mail immediately, and
> delete the e-mail and any attachments without using or disclosing the
> contents in any way. The views expressed in this e-mail are those of the
> author, and do not represent those of this company unless this is clearly
> indicated. You should scan this e-mail and any attachments for viruses.
This
> company accepts no liability for any direct or indirect damage or loss
> resulting from the use of any attachments to this e-mail.
> -------
> u2-users mailing list
> [EMAIL PROTECTED]
> To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to