qbasic equivalent of shell eval
qbasic equivalent of shell eval
(OP)
Trying to do the equivalent to this shell fragment
set -A MyArray1 q w e r t y
set -A MyArray2 a s d f g h
x=1
eval print \${MyArray${x}[*]}
If you're familiar with unix, the first parse (eval) expands ${x} to 1, and removes the \
The second parse expands to ${MyArray1[*]} and prints q w e r t y
I know how to create and populate the arrays, but can't figure out the eval bit.
Thanks in advance.
set -A MyArray1 q w e r t y
set -A MyArray2 a s d f g h
x=1
eval print \${MyArray${x}[*]}
If you're familiar with unix, the first parse (eval) expands ${x} to 1, and removes the \
The second parse expands to ${MyArray1[*]} and prints q w e r t y
I know how to create and populate the arrays, but can't figure out the eval bit.
Thanks in advance.
RE: qbasic equivalent of shell eval
If you need something that MIGHT get close to that for Win/Dos... Look into Python
It is free and at www.python.org
Have Fun, Be Young... Code BASIC

-Josh
http://cubee.topcities.com
PROGRAMMER: (n) Red-eyed, mumbling mammal capable of conversing with inanimate objects.