Chr$(0)
$CRLF
" ", one Space, CHR$(32)
"", empty
$CR
$LF
EOF
something else
So Question is: What will theString contain now?Dim theString as String * 1
Last edited by ReneMiner; 21-02-2013 at 13:38.
I think there are missing some Forum-sections as beta-testing and support
Oh no,
I was so sure it will be $SPC ... but it is $NUL!
Let's undo my mistake by giving some sample code on how to determine ascii value of given string character:
PetrUses "Console" Function TBMain() Dim theString As String * 1 Byte asciiValue1 asciiValue1 = Asc(theString) PrintL "ASC(s):", asciiValue1 asciiValue1 = Asc(theString, 1) PrintL "ASC(s,1):", asciiValue1 Byte asciiValue2 At StrPtr(theString) PrintL "Virtual variable:", asciiValue2 asciiValue1 = Peek(Byte, StrPtr(theString)) PrintL "Peek:", asciiValue1 Byte asciiValue3( Len(theString) ) At StrPtr(theString) PrintL "Virtual array:", asciiValue3(1) PrintL PrintL "Press any key to continue..." WaitKey End Function
Last edited by Petr Schreiber; 21-02-2013 at 18:46.
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Bookmarks