[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
[sqr-users] Using the value of one variable to create a new variable
Hi All,
I have the following situation. I would like to use the value of one variable
(e.g. $A = 'B') to create a new variable ($B).
In short, I have an array. In the column Variable, I have values such as $A,
$B, $C. Note, they are stored as literals, but the value in the array is not
quoted.
I would like to Get the value from the array (e.g. $A), and then use that value
to create a new variable, letting $A now equal a new value.
begin-Program
Create-Array Name=DetailRec Size=13
Field=Variable:Char
Field=FirstChar:Char
Field=Length:Char
Put '$ItemIdInitial' '14' '30' Into DetailRec (0) Variable FirstChar Length
Get $Variable $FirstChar $Length from DetailRec (0) Variable FirstChar Length
Let #FirstChar = to_number($FirstChar)
Let #Length = to_number($Length)
Extract $Variable From $CurrentRecord #FirstChar #Length
end-Program
Where Extract $Variable From $CurrentRecord #FirstChar #Length would actually
be processed like:
Extract $ItemIdInitial From $CurrentRecord #FirstChar #Length
How do you do this????
Avery
---------------------------------
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users