String help and the Dat indexing problem
grasshopper
Posts: 438
OBJ Ser : "FullDuplexSerial" Var Byte RxDat[noparse][[/noparse]30] ' for serial data buffer Pub Main Ser.Start(USBRx,USBTx,OFF,19200) REPEAT IF (ser.rxcheck == "(") GetCom Pub Getcom | stringCount, Scrap, X Scrap~ StringCount~ Repeat UNTIL (RxDat[noparse][[/noparse] StringCount ] := SER.rx ) == ")" StringCount ++ Repeat X from 1 to 3 IF (textComp(@rxDat[noparse][[/noparse] 0 ],@RX[noparse][[/noparse] X ],7) == TRUE) Case X 1 : Ser.str(string("One")) 2 : Ser.str(string("Two")) 3 : Ser.str(string("Three")) Dat RX[noparse][[/noparse] 1 ] BYTE "One A11",0 Rx[noparse][[/noparse] 2 ] BYTE "Two B22",0 Rx[noparse][[/noparse] 3 ] BYTE "Three 33",0
My problem is in the Dat section. I cant index through the library of commands. Is there a way to do this?
Comments
-Phil
This is it. Sorry i did not post the code a bit ago, but it did not seem like anyone was interested.
Post Edited (grasshopper) : 1/10/2009 8:44:57 PM GMT
-Phil