RE: [U2] curious EQUATE issue - SOLVED Just want to know if anyone understands WHY?

2007-10-24 Thread Jerry Banker
to watch out for these little quirks of the language. Jerry -Original Message- From: Bill Haskett [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 23, 2007 9:11 PM To: u2-users@listserver.u2ug.org Subject: RE: [U2] curious EQUATE issue - SOLVED Just want to know if anyone understands WHY

RE: [U2] curious EQUATE issue - SOLVED Just want to know if anyone understands WHY?

2007-10-23 Thread Jerry Banker
We are running in Reality flavor on UniVerse 10.2.4 and Red Hat Linux AS3. Here is a test of the code using the two forms of LOCATE: EQU VALID.CC.TYPES TO 'A':@VM:'B':@VM:'D':@VM:'M':@VM:'S':@VM:'V' EQU VALID.CC.NAMES TO 'American Express':@VM:'Carte Blanche':@VM:'Diners

Re: [U2] curious EQUATE issue - SOLVED Just want to know if anyone understands WHY?

2007-10-23 Thread Rex Gozar
Allen, In your example, you use a variable in an EQUATE statement. This references the variable's pointer, not its value. So the code: TEMP = CHANGE('A.B.D.M.S.V','.',@VM) EQU VALID.CC.TYPES TO TEMP TEMP = SOMETHINGELSE ;* change TEMP's value DISPLAY VALID.CC.TYPES will display

RE: [U2] curious EQUATE issue - SOLVED Just want to know if anyone understands WHY?

2007-10-23 Thread Allen E. Elwood
Hi Rex, Interesting, never tried it before. I've only used it when I've had stuff that wouldn't go directly into EQU such as @(-1) in MvBASE. In that case I did: CCLR = @(-1) EQU CLR TO CCLR Wonder if EQU VALID.CC.TYPES TO CHANGE('A.B.D.M.S.V','.',@VM) Would work or error out.?

Re: [U2] curious EQUATE issue - SOLVED Just want to know if anyone understands WHY?

2007-10-23 Thread Rex Gozar
Allen, EQU VALID.CC.TYPES TO CHANGE('A.B.D.M.S.V','.',@VM) does compile and it will protect the value of VALID.CC.TYPES from being unintentionally changed -- which is the reason for using EQU to declare constants in the code. I just wanted to remind people that equating to a variable does

Re: [U2] curious EQUATE issue - SOLVED Just want to know if anyone understands WHY?

2007-10-23 Thread Richard Nuckolls
regarding the example below: EQU VALID.CC.TYPES TO CHANGE('A.B.D.M.S.V','.',@VM) The problem with this is that the CHANGE within the EQU will get evaluated at run time, so it will be done repeatedly if placed within a LOOP or FOR structure. You would be better off with the earlier

RE: [U2] curious EQUATE issue - SOLVED Just want to know if anyone understands WHY?

2007-10-23 Thread Bill Haskett
: Tuesday, October 23, 2007 7:06 AM To: u2-users@listserver.u2ug.org Subject: RE: [U2] curious EQUATE issue - SOLVED Just want to know if anyone understands WHY? We are running in Reality flavor on UniVerse 10.2.4 and Red Hat Linux AS3. Here is a test of the code using the two forms of LOCATE

Re: [U2] curious EQUATE issue - SOLVED Just want to know if anyone understands WHY?

2007-10-22 Thread Richard Nuckolls
When the new version of the equate was compiled under Information flavor, the compiler warned that it was a Reality style LOCATE. To its credit, the compiler defers the evaluation of the EQU until it is used, at which point, it evaluates it in context, so the compiler is evaluating

RE: [U2] curious EQUATE issue - SOLVED Just want to know if anyone understands WHY?

2007-10-22 Thread Allen E. Elwood
Very oddnot sure why, mass hysteria? ;-) I'll tell you what, this is an easier construct, especially if you have two dozen or so values to stick into an array. TEMP = CHANGE('A.B.D.M.S.V','.',@VM) EQU VALID.CC.TYPES TO TEMP -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL

RE: [U2] curious EQUATE issue - SOLVED Just want to know if anyone understands WHY?

2007-10-22 Thread Gyle Iverson
Richard Nuckolls wrote: the compiler is evaluating VALID.CC.TYPES1,1 as A':@VM:'B':@VM:'D':@VM:'M':@VM:'S':@VM:'V'1,1 The precedence of concatenation is lower than dynamic array extraction. Try placing parenthesis characters around the equate definition. E.g. EQU VALID.CC.TYPES TO