New line characters
Heavy
Posts: 6
Hello,
· I have a string like:
data = 1,0 0,1·1,1 0,0 (this is just what·the string contains, not how I define it)
Can can use File_Append in·DataLogger_UART_Driver.spin to write this to a .csv as:
1,0 0,1·1,1 0,0
But I would like File_Append to write it his way:
1,0
0,1
1,1
0,0
What characters to I need to insert to do this. Or is there a better way?
I've tried the code below, but if that had worked I wouldn't be posting this. Thanks in advance.......Heavy
· I have a string like:
data = 1,0 0,1·1,1 0,0 (this is just what·the string contains, not how I define it)
Can can use File_Append in·DataLogger_UART_Driver.spin to write this to a .csv as:
1,0 0,1·1,1 0,0
But I would like File_Append to write it his way:
1,0
0,1
1,1
0,0
What characters to I need to insert to do this. Or is there a better way?
I've tried the code below, but if that had worked I wouldn't be posting this. Thanks in advance.......Heavy
'''''''(PST = Parallax Serial Terminal) bytemove(@data + strsize(@data), PST#NL, strsize(PST#NL)+ 1) bytemove(@data + strsize(@data), PST#LF, strsize(PST#LF)+ 1)
Comments
So, a simple loop with counter and accessing the string like it's an array:
repeat i from 0 to strsize( @data )
if data[noparse][[/noparse] i ] == " "
data[noparse][[/noparse] i ] := 13
Thanks