PBP syntax - numbering variable
Hello
I just saw this piece of code in another thread
(http://www.picbasic.co.uk/forum/show...hlight=I2CREAD):
Code:
for n=0 to 19
temp1=n+(rec*20)+temp
I2CREAD SDA,SCL,160,temp1,[text[n]]
text[n]=text[n]-48
next n
Is it possible to do the same for this code:
Code:
LED var byte[3]
LED0 var GPIO.0
LED1 var GPIO.1
LED2 var GPIO.2
Counter var byte
MAIN:
for Counter = 0 to 2
Toggle LED[counter] '<<<< is this possible another way?
pause 200
next counter
goto main
end
Is thought this syntax would not be possible in PBP and my Editor won't allow this anyway.
I must miss something...
"REFERENCE" is the correct term
Thank you Bruce,
Your code works well.
Due to my ignorance, my example was not a good one... since I need to reference my variables (as I just learned the correct term now).
Sometimes, it is difficult to ask the right question.
Because of you, skimask, I'll need to study a few hours more... Thank you very very much for this ;-)