|
Post by TinSoldier on Apr 10, 2016 23:33:45 GMT
Whats the proper format to write and read ASCII values using a text file.
for instance the character -
"-" = 0x2D Hex or 45 ASCII
how would write the number 1 to 255 in their ASCII format to a text file ?
|
|
|
Post by WhyNot on Apr 11, 2016 4:11:04 GMT
i've got no idea
|
|
|
Post by TinSoldier on Apr 11, 2016 4:40:13 GMT
Turns out i found the solution to my own problem to write ASCII values to a text file do this - uint8 Val = 0;
void Main(){
if(iInitializing()){ FRO1 = iFileWriteOpen("somefile.txt"); if(FRO1 == -1) iScriptStop();
Val = 45; iFileByteWrite(FRO1,Val); iFileClose(FRO1); } }
stop 3drad and open the somefile.txt with notepad. I suggest using the "terminal" font cause it shows the proper original characters as written in OEM/DOS. You should see 1 character "-" the minus character. if you iFileByteRead this, you'll get a value of 45. All is good and proper in the world now
|
|
|
Post by TinSoldier on Apr 11, 2016 4:44:39 GMT
PS uint8 only supports values 0 to 255, or 256 total i'm unsure if negitive values are supported ...
|
|
|
Post by WhyNot on Apr 11, 2016 13:52:26 GMT
oooooohhhhhhhhhhhhhh now o get it
|
|