_STRING_TO_BUFFER improvement

Begonnen von Pessimister, 09. November 2011, 12:30:20

Vorheriges Thema - Nächstes Thema

0 Mitglieder und 1 Gast betrachten dieses Thema.

Pessimister

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.

hugo

that sounds like a useful suggestion, we will consider this for the next release by end of november