| Use of spaces in INPUT#/PRINT# statements|
I would to clarify this argument in order to update the next release of the UltimateMap.
As we know, if a string begins with spaces, it is automatically normalized stripping off the initial spaces. For ex. " ABC" will be retrieved as "ABC".
What I ask you is a confirmation (if somebody has verified with proper tests) if the stripping is done when INPUT# reads the string, or by PRINT# when it saves the string. In other hand, inside the file the string is stored normalized or original?
| Re: Use of spaces in INPUT#/PRINT# statements|
The initial space is written to disk. INPUT# fails to capture leading spaces from disk (just as INPUT fails to capture leading spaces from the keyboard).
10 REM : PRINT# / INPUT# TEST
20 A$ = CHR$(32) + "ABCDE" : REM ENSURE SPACE PRECEEDS LETTERS
30 OPEN8,8,8,"PRINT/INPUT TEST,S,W"
50 PRINT#8," FGHIJ " : REM SPACE BEFORE AND AFTER LETTERS
60 PRINT#8,"KLMNO" : REM NO SPACES
80 OPEN5,8,5,"PRINT/INPUT TEST,S,R"
120 CLOSE 5