Here we go with the wide variety of 'examples'. What is the sanity of PRINTER ON, then PRINT then PRINTER OFF?
Should we not be teaching PRINTER ON once and PRINTER OFF at the end? I've only seen the redundant PRINTER ON, then PRINT then PRINTER OFF when the programmer didn't know of CRT and was providing some PRINT @(x,y):ID running dialog. Plus, the EOF=0 then EOF=1 concept is also pretty Jurrasic. Most MV implementations will support: LOOP WHILE READNEXT KEY DO or LOOP READNEXT KEY ELSE EXIT UNTIL 0 DO and avoid the extra 'flags' and statements. Also, LN is a function and should not be used as a variable. Compiles? Yes, In the future? Maybe. My 1 cent. Mark Johnson ----- Original Message ----- From: "Louie Gouws" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Monday, March 12, 2007 10:03 AM Subject: RE: [U2] Reports In Universe BASIC > Hi > > Once you have gotten the hang of the program to print something you will > have more questions but this example will start you off > > Louie > > -------------- > *-- sample to illustrate how a report will be printed using U-Basic > *-- all bells and whistles to be added as soon as conceptual understanding > *-- is there > * > * open the file you want to report on > * > OPEN 'MASTERFILE' TO FILE ELSE STOP > * > * build the 'tcl' sentence to select the file > * > SENT='SSELECT MASTERFILE BY SURNAME' > EXECUTE SEN RETURNING NO.SELECTED > * > * if no items present then do whatever, like stop > * > IF NO.SELECTED = 0 THEN STOP > * > * loop thru the records > EOF=0 > LOOP > READNEXT KEY ELSE EOF=1 > UNTIL EOF DO > READ REC FROM FILE,KEY THEN > GOSUB PRINT.LINE > END > REPEAT > STOP > *-- > *-- > PRINT.LINE: > *-- > * rec<1>= the surname using 30 chars left justified > * rec<2>= the name using 15 chars left justified > * rec<3>= amount , converted to 0000.00 and 10 chars right justified > PRINTER ON > LN=REC<1> 'L#30':REC<2>:'L#15':OCONV(REC<3>,'MD2') 'R#10' > PRINT LN > PRINTER OFF > * > RETURN > > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Sanjeebkumar > Sarangi > Sent: 12 March 2007 14:01 > To: [email protected] > Subject: [U2] Reports In Universe BASIC > > Hi > > What type of report is generated in Universe Basic ? > Can any one tell me how to write a program that will generate a report ? > Please give me some example that will provide me a clear idea regarding > reports generation in Universe Basic. > ------- > 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/
