Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

qbasic equivalent of shell eval

Status
Not open for further replies.

slt589

Programmer
Jun 13, 2003
14
AU
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.

 
You MIGHT be able to get away with something that easy in VB but QB is not advanced enough to handle mocros like that without a lot of extra code...

If you need something that MIGHT get close to that for Win/Dos... Look into Python

It is free and at
Have Fun, Be Young... Code BASIC
-Josh
cubee101.gif


PROGRAMMER: (n) Red-eyed, mumbling mammal capable of conversing with inanimate objects.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top