Tom,

EQU LOTNO LIT "VAR.NAMES<2>"

LOTNO<1,2> = MySecondMV
(not LOTNOT<2>)

Works on UniVerse.

:-)

Brian 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> [EMAIL PROTECTED]
> Sent: 13 April 2005 13:53
> To: u2-users@listserver.u2ug.org
> Subject: RE: [U2] [UV] reference a variable indirectly?
> 
> Stewart Mitchell wrote on Wed, 13 Apr 2005 10:21:10 +1000
> 
> > Try
> >
> > EQU LOTNO LIT "VAR.NAMES<2>"
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > On Behalf Of Barry Brevik
> > Sent: Tuesday, April 12, 2005 6:59 PM
> >
> > ...I want to be able to store variable names in a file (for 
> example), 
> > and then assign values to those variables as the program encounters 
> > them.
> 
> Barry - I would recommend that, if you do this, you use a 
> dimensioned array for VAR.NAMES, e.g.:
> 
> DIM VAR.NAMES(100)
> EQU PARTNO LIT "VAR.NAMES(1)"
> EQU LOTNO LIT "VAR.NAMES(2)"
> EQU PARTNAME LIT "VAR.NAMES(3)"
> &c.
> 
> This way, if any of your variables are multi-valued, you can 
> reference them normally, e.g. LOTNO<3>.  In UniData, EQU is a 
> comiler directive - the substitution is made during 
> compilation and the symbolic names are made available to the debugger.
> 
> If you use a dynamic array for VAR.NAMES, you will run into 
> problems, since the compiler converts LOTNO<3> to 
> VAR.NAMES<2><3>, which is not valid syntax.
> 
> --Tom Pellitieri

-- 
Internal Virus Database is out-of-date.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.9.0 - Release Date: 31/03/2005
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to