OSCAT Forum

oscat.lib => Bestehende Module / Existing Modules => Thema gestartet von: Pessimister am 09. November 2011, 12:30:20

Titel: _STRING_TO_BUFFER improvement
Beitrag von: Pessimister am 09. November 2011, 12:30:20
The result of _STRING_TO_BUFFER function is completely useless. It always returns TRUE.
But it could be more useful while writing multiple strings to the buffer. I propose to calculate a position for the next function call.

FUNCTION _STRING_TO_BUFFER : INT
< function text >
_STRING_TO_BUFFER := end +1;

It will be easier to fill the buffer with strings in this case, for example:

pos := _STRING_TO_BUFFER ('The value of the Str variable is ', pos, ptSend, BufferSize);
pos := _STRING_TO_BUFFER (Str, pos, ptSend, BufferSize);
pos := _STRING_TO_BUFFER ('$R$N', pos, ptSend, BufferSize);

Thank you all for attention.
Titel: Re: _STRING_TO_BUFFER improvement
Beitrag von: hugo am 09. November 2011, 17:53:09
that sounds like a useful suggestion, we will consider this for the next release by end of november