Page 1 of 1

[Implemented] Reading strings until reaching a size of bytes

Posted: Fri Sep 03, 2004 9:49 pm
by Sunny
Hello,

I got an idea for a better handling with the file-system. What is about reading a string until a size of bytes is reached? Is that possible?
Like that:

Code: Select all

ReadString([size_in_byte])
So it is not necessary to got a "end of line"- sign and many strings could be in one line without seperate them, but could be read seperated and correctly with the size-parameter. Then it would stop reading at reaching the size of bytes in the optional parameter.

So, that is what I'd like to have in in the future for better handling with strings.

mfg.

Sunny

Posted: Sat Sep 04, 2004 12:17 am
by Dare2
Sounds like you've just described ReadData.
Syntax

Length = ReadData(*MemoryBuffer, LengthToRead)
Description

Read the content of the current file inside the specified memory buffer. 'LengthToRead' hold the number of chars to read.

After executing the command the 'Length' variable will hold the number of really read chars. Useful for validating purposes.

Posted: Sat Sep 04, 2004 11:13 am
by Sunny
Oh, sorry, I've never seen that command, so never used... 8O
But better already included than in to-do-list. :wink: