Autor Thema: _STRING_TO_BUFFER improvement  (Gelesen 5423 mal)

0 Mitglieder und 1 Gast betrachten dieses Thema.

Pessimister

  • Gast
_STRING_TO_BUFFER improvement
« 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.

Offline hugo

  • Global Moderator
  • *****
  • Beiträge: 2 150
    • Profil anzeigen
Re: _STRING_TO_BUFFER improvement
« Antwort #1 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