SwingeyP
Member
Hi can anyone help me with this please?
I want to store a string something like this
DIM bargraph(10) as Byte
bargraph(6) = s_p, #sr, " ", 0, 1, 2, 3, 4, 5, 6, " "
or perhaps three is a better way?
I have this code:
bargraph0:
Lcdcmdout LcdLine2Home
Lcdout s_p, " ", "0 "
WaitMs 1
Goto home
bargraph1:
Lcdcmdout LcdLine2Home
Lcdout s_p, #sr, " ", 0, " "
WaitMs 1
Goto home
bargraph2:
Lcdcmdout LcdLine2Home
Lcdout s_p, #sr, " ", 0, 1, " "
etc.....
It seems to me that it would be great to do something like this here instead
bargraph:
Lcdcmdout LcdLine2Home
Lcdout bargraph(var)
Goto home
that way I could just call 1 line which would read the array element associated with var.
Is this possible?
Regards - Paul
I want to store a string something like this
DIM bargraph(10) as Byte
bargraph(6) = s_p, #sr, " ", 0, 1, 2, 3, 4, 5, 6, " "
or perhaps three is a better way?
I have this code:
bargraph0:
Lcdcmdout LcdLine2Home
Lcdout s_p, " ", "0 "
WaitMs 1
Goto home
bargraph1:
Lcdcmdout LcdLine2Home
Lcdout s_p, #sr, " ", 0, " "
WaitMs 1
Goto home
bargraph2:
Lcdcmdout LcdLine2Home
Lcdout s_p, #sr, " ", 0, 1, " "
etc.....
It seems to me that it would be great to do something like this here instead
bargraph:
Lcdcmdout LcdLine2Home
Lcdout bargraph(var)
Goto home
that way I could just call 1 line which would read the array element associated with var.
Is this possible?
Regards - Paul