RE: [U2] [UV] WHILE READNEXT id DO {{not a holy war,just a code example)

2004-06-22 Thread Dennis Bartlett
Just a quick look, it appears the code is adding to the city and state totals before checking if the city or state values have changed. Allen, have you had this vision problem for long - quick look, my apple! *test if city has changed? IF (CITY NE LAST.CITY) THEN GOSUB

RE: [U2] [UV] WHILE READNEXT id DO {{not a holy war,just a code example)

2004-06-22 Thread Dennis Bartlett
This code example is also flawed in that a break-on state should automatically break-on city first regardless if the city has changed. As it is, it assumes that there could never be this situation: Agreed... knew there was summat I was missin' :0) --- u2-users mailing list [EMAIL

RE: [U2] [UV] WHILE READNEXT id DO {{not a holy war,just a code example)

2004-06-22 Thread Dennis Bartlett
(A) Also, what do the CRT SPACE(40) lines do besides CRT? (B) And shouldn't this have been written using PRINT in case the output wishes to go to the printer and you can use PRINTER ON instead of changing the CRT lines. (A) The crt space(40) lines line up the totals under the relevant

Re: [U2] [UV] WHILE READNEXT id DO {{not a holy war,just a code example)

2004-06-22 Thread Mark Johnson
: Dennis Bartlett [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 22, 2004 2:26 AM Subject: RE: [U2] [UV] WHILE READNEXT id DO {{not a holy war,just a code example) (A) Also, what do the CRT SPACE(40) lines do besides CRT? (B) And shouldn't this have been written using PRINT

Re: [U2] [UV] WHILE READNEXT id DO

2004-06-21 Thread Jan Shaw and Keith Johnson
I like the syntax a lot, and even put the LOOP on the same line as the UNTIL. So Ray Wurlod's example I would have written as LOOP WHILE READSEQ line FROM f GOSUB processline REPEAT I was surprised to see an assertion that this didn't work in Pick, as I remember Henry Eggers was a

Re: [U2] [UV] WHILE READNEXT id DO {{not a holy war,just a code example)

2004-06-21 Thread Mark Johnson
PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 21, 2004 5:07 AM Subject: RE: [U2] [UV] WHILE READNEXT id DO {{not a holy war,just a code example) SORT CUSTOMER BY STATE BY CITY {showing} NAME BREAK-ONCITY BREAK-ONSTATE TOTAL YTD-SALES ORDERS File

RE: [U2] [UV] WHILE READNEXT id DO {{not a holy war,just a code example)

2004-06-21 Thread Allen E. Elwood \(CA\)
:[EMAIL PROTECTED] Behalf Of Dennis Bartlett Sent: Monday, June 21, 2004 2:07 AM To: [EMAIL PROTECTED] Subject: RE: [U2] [UV] WHILE READNEXT id DO {{not a holy war,just a code example) SORT CUSTOMER BY STATE BY CITY {showing} NAME BREAK-ONCITY BREAK-ONSTATE TOTAL

Re: [U2] [UV] WHILE READNEXT id DO {{not a holy war,just a code example)

2004-06-21 Thread Mark Johnson
Another note on the differences between READNEXTS. As I support UD/UV/D3/MCD and Native clients, I like to be consistent in my application programs. Thus, when appropriate, I have a subroutine that I can use blindly in my application thinking and not have to remember which format works for which

Re: [U2] [UV] WHILE READNEXT id DO {{not a holy war,just a code example)

2004-06-21 Thread Mark Johnson
PROTECTED] Sent: Monday, June 21, 2004 12:22 PM Subject: RE: [U2] [UV] WHILE READNEXT id DO {{not a holy war,just a code example) Just a quick look, it appears the code is adding to the city and state totals before checking if the city or state values have changed. This means if the city or state has

Re: [U2] [UV] WHILE READNEXT id DO {{not a holy war,just a code example)

2004-06-21 Thread Mark Johnson
Perhaps Cities and States won't have this real problem. But Salesman, Customers and Products certainly could. my 1 cent - Original Message - From: Allen E. Elwood (CA) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 21, 2004 12:22 PM Subject: RE: [U2] [UV] WHILE READNEXT id DO

Re: [U2] [UV] WHILE READNEXT id DO {{not a holy war,just a code example)

2004-06-21 Thread Dave S
That's painful to look at. Isn't it more efficient to do the select and then read the id's while they are in memory ? What if your selection contains 500,000 items, won't that IDS array be huge ? Mark Johnson [EMAIL PROTECTED] wrote: Another note on the differences between READNEXTS. As I

Re: [U2] [UV] WHILE READNEXT id DO

2004-06-20 Thread Anthony W. Youngman
In message [EMAIL PROTECTED], [EMAIL PROTECTED] writes At any rate Mark, I have never seen a problem using GOTOs that I couldn't re-create without using GOTOs. But I think what you're really after is someone to do this work FOR you. So show me the purchase order first ... I have. But that was

Re: [U2] [UV] WHILE READNEXT id DO

2004-06-18 Thread Mats Carlid
I presume you have never had to maintain programs written in a language totally lacking structured code elements like assembler or to a lesser degree fortranIV. I have. Believe me: GOTO's ( or conditional and unconditional branches, jumps or transfers ) ARE EVIL ! It's som much easier to

RE: [U2] [UV] WHILE READNEXT id DO

2004-06-18 Thread Dennis Bartlett
leaving the next generation - is that what you want to be remembered for? dennis -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mats Carlid Sent: 18 June 2004 09:43 To: [EMAIL PROTECTED] Subject: Re: [U2] [UV] WHILE READNEXT id DO I presume you have never

Re: [U2] [UV] WHILE READNEXT id DO

2004-06-18 Thread BNeylon
PROTECTED] 06/17/2004 08:02 PM Please respond to u2-users To: [EMAIL PROTECTED] cc: Subject:Re: [U2] [UV] WHILE READNEXT id DO Don't forget that the second set has the benefit of the first set leaving some of the data in virtual memory, hence the second set

RE: [U2] [UV] WHILE READNEXT id DO

2004-06-18 Thread alfkec
END.CPU-START.CPU: :CTR: GOTO -Original Message- From: Mark Johnson [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 6:03 PM To: [EMAIL PROTECTED] Subject: Re: [U2] [UV] WHILE READNEXT id DO Don't forget that the second set has the benefit of the first set leaving some

Re: [U2] [UV] WHILE READNEXT id DO

2004-06-18 Thread Mark Johnson
, June 17, 2004 9:32 PM Subject: RE: [U2] [UV] WHILE READNEXT id DO Mark Johnson wrote: This appears to be the semi-annual GOTO holy war. But only one side is fighting. Leave it alone Mark. Nothing good came of it last time, and nothing good will come of it this time. Those who believe GOTOs

Re: [U2] [UV] WHILE READNEXT id DO

2004-06-18 Thread Glenn Herbert
At 01:07 PM 6/18/2004, you wrote: I've always thought it would be cool if some Pick vendor would create a verb like MAKE.BASIC And you could say MAKE.BASIC SELECT CUSTOMER WITH LAST.NAME = JOHNSON BY STATE BREAK-ON STATE TOTAL COUNTER And it would take the statement and turn it into a BASIC

RE: [U2] [UV] WHILE READNEXT id DO

2004-06-18 Thread Jefferson, Jim
And ol' Arev has this feature as a query option: LIST FILE BY THIS BY THAT BREAK-ON THIS TOTAL SOMETHING (X) With the option X, you are prompted for a file name and record id, and the source code is written there. Sort of funky-looking, though... Don't know if they carried it over into

Re: [U2] [UV] WHILE READNEXT id DO

2004-06-18 Thread Ray Wurlod
Personally, I love this syntax. When training others, I usually explain it in this form; READNEXT has to generate a true/untrue value of some kind to determine whether to go down its THEN or ELSE path. We take advantage of that Boolean context to trigger the behaviour of WHERE or UNTIL in a

RE: [U2] [UV] WHILE READNEXT id DO

2004-06-17 Thread Piers Angliss
Personally I use it all the time (except I'm even sloppier and I drop the DO ) It's been around for as long as I can remember so I think it just isn't documented I find it pretty readable but I take your point on using undocumented features - boy, will I be in trouble if IBM ever change it. Piers

Re: [U2] [UV] WHILE READNEXT id DO

2004-06-17 Thread Louis Windsor
The format - LOOP WHILE READNEXT ID code REPEAT was the suggested standard where I used to work. Louis - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 17, 2004 4:57 PM Subject: [U2] [UV] WHILE READNEXT id DO : LOOP : code : WHILE

Re: [U2] [UV] WHILE READNEXT id DO

2004-06-17 Thread Louie Gouws
Hi Adrian, I personally use: EOF=0 LOOP READNEXT id ELSE EOF=1 code UNTIL EOF DO code REPEAT It is much clearer(i hope) to the next guy looking at the code. Louie. Adrian wrote: LOOP code WHILE READNEXT id DO

Re: [U2] [UV] WHILE READNEXT id DO

2004-06-17 Thread Mark Johnson
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

Re: [U2] [UV] WHILE READNEXT id DO

2004-06-17 Thread Mark Johnson
the application. my 1 cent - Original Message - From: Louie Gouws [EMAIL PROTECTED] To: u2 List (E-mail) [EMAIL PROTECTED] Sent: Thursday, June 17, 2004 6:50 AM Subject: Re: [U2] [UV] WHILE READNEXT id DO Hi Adrian, I personally use: EOF=0 LOOP READNEXT id ELSE EOF=1 code

Re: [U2] [UV] WHILE READNEXT id DO

2004-06-17 Thread Dave S
I like to use : LOOP WHILE 1 DO READNEXT ID ELSE EXIT REPEAT Louis Windsor [EMAIL PROTECTED] wrote: The format - LOOP WHILE READNEXT ID code REPEAT was the suggested standard where I used to work. Louis - Original Message - From: To: Sent: Thursday, June 17, 2004 4:57 PM

RE: [U2] [UV] WHILE READNEXT id DO

2004-06-17 Thread Dave S
To: [EMAIL PROTECTED] Subject: Re: [U2] [UV] WHILE READNEXT id DO I like to use : LOOP WHILE 1 DO READNEXT ID ELSE EXIT REPEAT Louis Windsor wrote: The format - LOOP WHILE READNEXT ID code REPEAT was the suggested standard where I used to work. Louis - Original Message - From

RE: [U2] [UV] WHILE READNEXT id DO

2004-06-17 Thread Peter Gonzalez
That is what I have used for years. It's simple to understand what the program is doing. At 03:03 PM 6/17/2004 +0100, you wrote: Why do you need the WHILE 1 DO? You could use LOOP READNEXT ID ELSE EXIT code REPEAT Peter Gonzalez Senior Programmer Analyst M M Aerospace

Re: [U2] [UV] WHILE READNEXT id DO

2004-06-17 Thread BNeylon
To: [EMAIL PROTECTED] cc: Subject:Re: [U2] [UV] WHILE READNEXT id DO I like to use : LOOP WHILE 1 DO READNEXT ID ELSE EXIT REPEAT --- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/

RE: [U2] [UV] WHILE READNEXT id DO

2004-06-17 Thread Nick Cipollina
You could even try LOOP READNEXT ID ELSE EXIT [Code goes here] REPEAT This works just fine. -Original Message- From: Dave S [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 9:57 AM To: [EMAIL PROTECTED] Subject: Re: [U2] [UV] WHILE READNEXT id DO I like to use

Re: [U2] [UV] WHILE READNEXT id DO

2004-06-17 Thread Dave S
Health Care Management Group Dave S Sent by: [EMAIL PROTECTED] 06/17/2004 09:56 AM Please respond to u2-users To: [EMAIL PROTECTED] cc: Subject: Re: [U2] [UV] WHILE READNEXT id DO I like to use : LOOP WHILE 1 DO READNEXT ID ELSE EXIT REPEAT --- u2-users mailing list [EMAIL PROTECTED

Re: [U2] [UV] WHILE READNEXT id DO

2004-06-17 Thread Simon Lewington
[EMAIL PROTECTED] ... LOOP code WHILE READNEXT id DO more code REPEAT I prefer: 100 [code] GOTO 300 200 [more code] GOTO 100 300 READNEXT ID THEN GOTO 200 --- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/

Re: [U2] [UV] WHILE READNEXT id DO

2004-06-17 Thread BNeylon
PM Please respond to u2-users To: [EMAIL PROTECTED] cc: Subject:Re: [U2] [UV] WHILE READNEXT id DO If you are running on some old school system, it may cost you. But don't these programs on Unidata all get compiled into C ? [EMAIL PROTECTED] wrote: Why use

RE: [U2] [UV] WHILE READNEXT id DO

2004-06-17 Thread Allen E. Elwood \(CA\)
Of Simon Lewington Sent: Thursday, June 17, 2004 11:02 AM To: [EMAIL PROTECTED] Subject: Re: [U2] [UV] WHILE READNEXT id DO [EMAIL PROTECTED] ... LOOP code WHILE READNEXT id DO more code REPEAT I prefer: 100 [code] GOTO 300 200 [more code] GOTO 100 300 READNEXT ID THEN GOTO 200 --- u2-users

Re: [U2] [UV] WHILE READNEXT id DO

2004-06-17 Thread Peter Gonzalez
Now we all know that you are kidding, right? Rule number 1 when we traine new programmers. NO GOTOs! At 07:02 PM 6/17/2004 +0100, you wrote: [EMAIL PROTECTED] ... LOOP code WHILE READNEXT id DO more code REPEAT I prefer: 100 [code] GOTO 300 200 [more code] GOTO 100 300 READNEXT ID

RE: [U2] [UV] WHILE READNEXT id DO

2004-06-17 Thread Glenn Herbert
: Thursday, June 17, 2004 11:02 AM To: [EMAIL PROTECTED] Subject: Re: [U2] [UV] WHILE READNEXT id DO [EMAIL PROTECTED] ... LOOP code WHILE READNEXT id DO more code REPEAT I prefer: 100 [code] GOTO 300 200 [more code] GOTO 100 300 READNEXT ID THEN GOTO 200 --- u2-users mailing list [EMAIL

Re: [U2] [UV] WHILE READNEXT id DO

2004-06-17 Thread Dave S
REPEAT END.CPU = SYSTEM(9) CRT END.CPU-START.CPU I get 290 320 Bruce M Neylon Health Care Management Group Dave S Sent by: [EMAIL PROTECTED] 06/17/2004 01:09 PM Please respond to u2-users To: [EMAIL PROTECTED] cc: Subject: Re: [U2] [UV] WHILE READNEXT id DO If you are running on some old

Re: [U2] [UV] WHILE READNEXT id DO

2004-06-17 Thread BNeylon
: Subject:Re: [U2] [UV] WHILE READNEXT id DO No thanks. I don't have any time for that today or tomorrow either. We are running SB+ here and don't write this little loopy d loop routines here anyway. --- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http

RE: [U2] [UV] WHILE READNEXT id DO

2004-06-17 Thread Allen E. Elwood \(CA\)
:[EMAIL PROTECTED] Behalf Of Glenn Herbert Sent: Thursday, June 17, 2004 12:01 PM To: [EMAIL PROTECTED] Subject: RE: [U2] [UV] WHILE READNEXT id DO Is BASIC structured? :-p If your answer is yes, then the GOTO should probably not be allowed (except in rare cases). If your answer is no, then GOTO

Re: [U2] [UV] WHILE READNEXT id DO

2004-06-17 Thread Dave S
the way we've always done it :-) Have a good one. Bruce M Neylon Health Care Management Group Dave S Sent by: [EMAIL PROTECTED] 06/17/2004 03:21 PM Please respond to u2-users To: [EMAIL PROTECTED] cc: Subject: Re: [U2] [UV] WHILE READNEXT id DO No thanks. I don't have any time for that today

Re: [U2] [UV] WHILE READNEXT id DO

2004-06-17 Thread Mark Johnson
, 2004 5:49 PM Subject: Re: [U2] [UV] WHILE READNEXT id DO I worked for one company that required us to take a programming test. We had to code a program without any goto's to pass the test. Once employed, all programmers were required to follow the programming standards there. [EMAIL

Re: [U2] [UV] WHILE READNEXT id DO

2004-06-17 Thread Mark Johnson
ELSE GOTO 15 GOTO 10 15 END=SYS9 PRINT END-START - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 17, 2004 2:25 PM Subject: Re: [U2] [UV] WHILE READNEXT id DO If you are running on any system it will cost you. The only question is, do you mind

Re: [U2] [UV] WHILE READNEXT id DO

2004-06-17 Thread Mark Johnson
like to see how the other side programs this. thanks in advance. - Original Message - From: Glenn Herbert [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 17, 2004 3:00 PM Subject: RE: [U2] [UV] WHILE READNEXT id DO Is BASIC structured? :-p If your answer is yes

RE: [U2] [UV] WHILE READNEXT id DO

2004-06-17 Thread Ross Ferris
- [EMAIL PROTECTED] On Behalf Of Dave S Sent: Friday, 18 June 2004 3:10 AM To: [EMAIL PROTECTED] Subject: Re: [U2] [UV] WHILE READNEXT id DO If you are running on some old school system, it may cost you. But don't these programs on Unidata all get compiled into C ? --- Outgoing mail is certified

RE: [U2] [UV] WHILE READNEXT id DO

2004-06-17 Thread Ken Wallis
Mark Johnson wrote: This appears to be the semi-annual GOTO holy war. But only one side is fighting. Leave it alone Mark. Nothing good came of it last time, and nothing good will come of it this time. Those who believe GOTOs have their uses will not be convinced otherwise by a thread on a

RE: [U2] [UV] WHILE READNEXT id DO

2004-06-17 Thread Allen E. Elwood \(CA\)
a good programmer. IMHO! Allen -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Mark Johnson Sent: Thursday, June 17, 2004 5:12 PM To: [EMAIL PROTECTED] Subject: Re: [U2] [UV] WHILE READNEXT id DO Very good question. Is BASIC Structured. And who defines