PDA

View Full Version : Variables in Lookup



BlackDiamond
- 28th June 2012, 14:34
Is there a way to have lookup refer to a variable? I have a routine that requires several values for "hello" but I can't figure out how to replace the string with a variable. Or should I be using a different approach?
For B0 = 0 To 5
LOOKUP B0,[“Hello!”],B1
Next B0

Megahertz
- 4th July 2012, 00:42
I can't understand your question correctly. Could you explain a bit more with an examPle may be

BlackDiamond
- 9th July 2012, 12:47
Here's the kind of thing that I need to do:


M1 = "Message_1"
M2 = "Message_2"
M3 = "Message_3"

If x = 1 then Mess = M1
If x = 2 then Mess = M2
If x = 3 then Mess = M3

For B0 = 0 To 8
LOOKUP B0,[“Mess”],B1
Serout 0,N2400,[B1]
Next B0