# \_STRING\_TO\_BUFFER improvement

**URL:** <https://oscat.discourse.group/t/string-to-buffer-improvement/1215>\
**Category:** Bestehende Module / Existing Modules\
**Created:** [9. November 2011 um 11:30 UTC](https://oscat.discourse.group/t/string-to-buffer-improvement/1215 "2011-11-09T11:30:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/oscat/original/1X/2efdfb9c592ff9a666c94dff124ee84fa863dae5.jpeg) [@system](https://oscat.discourse.group/u/system)\
**Post date:** [9. November 2011 um 11:30 UTC](https://oscat.discourse.group/t/string-to-buffer-improvement/1215/1 "2011-11-09T11:30:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![hugo](https://yyz2.discourse-cdn.com/free1/user_avatar/oscat.discourse.group/hugo/32/133_2.png) [@hugo](https://oscat.discourse.group/u/hugo)\
**Post date:** [9. November 2011 um 16:53 UTC](https://oscat.discourse.group/t/string-to-buffer-improvement/1215/2 "2011-11-09T16:53:09Z")

</div>

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