Hi Joe,
What version of PBP are you using?
Your first version should work just fine. FOR letters = STRING[0] to STRING[9] is essentially
the same as FOR letters = "A" to "J", which works the same.
This;
Outputs this;Code:DEFINE OSC 20 INCLUDE "modedefs.bas" LETTERS VAR BYTE String VAR BYTE[10] string[0]= "A" string[1]= "B" string[2]= "C" string[3]= "D" STRING[4]= "E" STRING[5]= "F" STRING[6]= "G" STRING[7]= "H" STRING[8]= "I" STRING[9]= "J" loop: FOR letters = STRING[0] to STRING[9] SEROUT PORTC.6,T9600,["string is ",(LETTERS),13,10] PAUSE 500 NEXT letters GOTO loop END
Code:string is A string is B string is C string is D string is E string is F string is G string is H string is I string is J string is A string is B string is C string is D, etc, etc,




Bookmarks