MAINSAIL Language Manual, Section 32.57

previous   next   top   contents   index   framed top   this page unframed


32.57. $copyStringToField

Figure 32–57. $copyStringToField
<macro>     $copyStringToField
                        (
STRING s;
                         <
POINTER or ADDRESSa;
                         <
field namefld);

$copyStringToField is useful for copying a MAINSAIL STRING to a C string.

$copyStringToField copies the characters of s to a.fld, where a is a classified POINTER or ADDRESS. s is truncated by the size of fld, if necessary. A NUL character is stored after the last copied character if that character is not a NUL character. fld will typically be a $CHAR $INPLACEARRAY field, although this is not necessary. This macro uses size(a.fld), which cannot exceed $maxInteger. An example is given in Section 32.86.


previous   next   top   contents   index   framed top   this page unframed

MAINSAIL Language Manual, Section 32.57