Quote: "Run the code I posted here. Lower() only returns the first character of a string, and converts numbers to letters!"
Yep, I reported this one to Mike the first day of AGK's release, he replied telling me he fixed it
.
For now you can use this "Lower$()" function I made:
Function Lower$( text$ as string )
newText$ = ""
For i = 0 to Len( text$ )
char$ = Mid( text$,i,1 )
if Asc( char$ ) >= 65 and Asc( char$ ) <= 90
newText$ = newText$ + chr( Asc( char$ ) + 32 )
else
newText$ = newText$ + char$
endif
Next i
Endfunction newText$
Quote: "Trying to check for the end of the file to protect against this fails also. Example:
if FileEOF(1)=0 then s$=ReadLine(1)"
Try using this function to get the amount of lines in the file:
Function FileLength( file$ as string )
lines = 0
OpentoRead( 1,file$ )
Repeat
lines = lines + 1
n$ = ReadLine( 1 )
Until FileEOF( 1 ) = 1
CloseFile( 1 )
lines = lines - 1
Endfunction lines
If you loop through the file, and are using the "lines" value returned from this function, loop from 0 to "lines". For example
fLines = FileLength( "myFile.txt" )
OpenToRead( 1,"myFile.txt" )
For i = 0 to fLines
line$ = ReadLine( 1 )
Next i
CloseFile( 1 )