Re: 4GL style (was Re: Is this a bug w/ 4GL 4.10)
Posted in 1993
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Server Administration
Alan, i have never written a line of cobol, and never plan to. but i do write "narrow" code. my reasoning, lets say i write a sql statement in 'wide code format' for a user. the user agrees that the information is correct, but would like to see column b after column c. 'wide code' dictates that i have to locate the column in the column list and then delete it and the retype it. the 'narrow code' style allows for a cut-and-paste (3 keystrokes in vi). for the same reason, i advocate putting the AND/OR's in the where clause as: . . . WHERE condition1 WHERE condition1 AND AND condition2 vs. condition2 AND AND condition3 condition3 in this case, what if you want to remove conditions 2 and 3. not only do you have to delete the 2 lines, you have to remove the AND. extra keystrokes. ideally, programmers would code in whatever manner they wish and run their code through a 'pretty-printer' prior to launching it into production. regards, ------------------------------------------------------------------------------ | . . Bob Baskett | ... ... Software Engineer, DBA | ..... ..... Business Systems Integration Group | .. ... .. Semiconductor Products Sector | . . . Mesa, AZ | | Motorola, Inc ------------------------------------------------------------------------------ Sun 690-MP Informix Versions: Online - 5.00.UC2 ISQL - 4.10.UD1 4GL-RDS- 4.10.UC1 ------------------------------------------------------------------------------