Bravo. If I were to use Includes for file definitions, I would use that method for consistency.
One client of mine uses a quasi-4GL called Primac that apparently pre-dates Includes. I don't know when Includes were added to mv systems overall, but I recall them being added to Microdata around 1984 (although in a sort-of prohibitive way). Primac uses a pre-compiler that processes the source code looking for $CPYLIB INCLUDE.FILE INCLUDE.ITEM and converted the $CPYLIB expression manually as an Include and generated basically the larger source code of which was then compiled. Add a common INPUT and PRINT subroutine and those guys were on to something pretty smart for the 1984 time period. There are 2 downsides to the Microdata Includes. First, the run-time error messages were offset by the number of lines of the includes. Thus you could get "Divide by zero on line 478" and 478 was END. Second, you could only Include items from the same file as the item was in. Maybe I'm missing something. Since I still have a few old Microdata clients and I miss using regular Includes (and regular called subs), I make the very first line of code "GOSUB GET.INCLUDES" and put all of my Includes at the end of the program. That takes care of the line number offset problem. Unable to find documentation for the syntax of Microdata Includes, does anyone remember how I could have one Include file be available to a system with more than one BP file. Otherwise, I maintain the Includes redundantly in each BP file. Thanks in advance. Mark Johnson ----- Original Message ----- From: "Womack, Adrian" <[EMAIL PROTECTED]> To: <u2-users@listserver.u2ug.org> Sent: Friday, March 23, 2007 12:20 AM Subject: RE: [U2] @VARIABLES > Nothing wrong with "TO". LIT means "literally", I usually use TO for > numbers and LIT for everything else. Using LIT with strings containing > spaces is a little clearer than using TO. The help for EQUATE states > "TO" is for equating to an expression, whereas "LIT" is for equating to > a string. > > Regarding INCLUDES, I did state "We created our own include to define > the most commonly used". > > We also have one set of equates for each of our data files (used for > field numbers), but they all exist in their own include, making field > names unique across all of our systems. Most of our programs will have > five or six INCLUDES at the top and then they drop straight into the > code. > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of MAJ Programming > Sent: Friday, 23 March 2007 1:53 PM > To: u2-users@listserver.u2ug.org > Subject: Re: [U2] @VARIABLES > > Two things: > > 1. What does LIT mean? > 2. How popular is having this double equate situation. What's wrong with > EQUATE ERASE TO @(-1) > > I have a small pet peeve with equates like this. If not in an include it > causes the programs to become very hard to read as you're listing > hundreds of lines before you get to any real action. Second, not being > in an include, the prior programmers may have had many sets of equates > (one per data file) taking up so much room and the gist of the program > is: > > LOOP WHILE READNEXT ID DO > READ CUST FROM F.CUSTOMER, ID ELSE CONTINUE > CUST<CM$MTD.SALES>="" > WRITE CUST ON F.CUSTOMER, ID > REPEAT > > So this program may be 200-300 lines only to support this function. > > Third, not having them in an include may cause some deviation amongst > the different programs using the same files. > > I've got a new client with an old box using the ABEST programming > structure and while it supports INCLUDES, each program may have hundreds > of lines of individual equates for simple updating like above. I'm > trying to rein in the horses by converting to an include but I have to > neutralize the field name differences. Very unreadable. > > For the newbies, if you're going to use many equates, put them in an > INCLUDE for consistency. > > My 2 cents > Mark JOhnson > > > ----- Original Message ----- > From: "Womack, Adrian" <[EMAIL PROTECTED]> > To: <u2-users@listserver.u2ug.org> > Sent: Thursday, March 22, 2007 7:29 PM > Subject: RE: [U2] @VARIABLES > > > > Are you guys aware of the universe supplied include: > > ATFUNCTIONS.INS.IBAS (or ATFUNCTIONS.H) which resides in > > .../uv/INCLUDE > > > > Here's an extract: > > > > EQUATE IT$CS TO -1 ;* clear screen (ANSI) > > EQUATE IT$CAH TO -2 ;* cursor absolute home (ANSI) > > EQUATE IT$CLEOS TO -3 ;* clear to end of screen > > EQUATE IT$CLEOL TO -4 ;* clear to end of line > > EQUATE IT$SBLINK TO -5 ;* start blinking field > > EQUATE IT$EBLINK TO -6 ;* end blinking field > > > > We created our own include to define the most commonly used, using the > > > supplied names: > > > > EQUATE ERASE LIT "@(IT$CS)" > > EQUATE HOME LIT "@(IT$CAH)" > > EQUATE CS LIT "@(IT$CLEOS)" > > EQUATE CL LIT "@(IT$CLEOL)" > > EQUATE BLNK LIT "@(IT$SBLINK)" > > EQUATE BS LIT "@(IT$CUB)" > > EQUATE BG LIT "@(IT$SHALF)" > > EQUATE FG LIT "@(IT$EHALF)" > > EQUATE INV LIT "@(IT$SREV)" > > EQUATE NORM LIT "@(IT$EREV)" > > etc. > > > > > > IMO it's best to use EQUATES as then there is no possibility of > > someone accidentally assigning something else to those names. > > > > Adrian > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > DISCLAIMER: > > 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 > > u2-users@listserver.u2ug.org > > To unsubscribe please visit http://listserver.u2ug.org/ > ------- > u2-users mailing list > u2-users@listserver.u2ug.org > To unsubscribe please visit http://listserver.u2ug.org/ > > > DISCLAIMER: > 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 > u2-users@listserver.u2ug.org > To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/