Sometimes, some of the query or change tags do not return a string, but a pointer to a string. This is an address where the string lies in the completely useless 'C' format. The MKSTRING$ function looks at the string located at that address, and returns it to SBasic as a real string.
Syntax:
String$=MKSTRING$(address)
Example:
l_item_t=PWquery(my_loose_item_object,PW ('LOOSE_TEXT',)) item_text$=MKSTRING(l_item_t)
This queries the item and gets a pointer to the text of the item from it, and then makes a string out of this, which is returned in item_text$.
Syntax: MKLEN
string$
page 1
Both of these keywords should be used ONLY when you are sure that there is, indeed, a CHR$(0) at the end. If not, and especially in a compiled program, it could happen that the variable stops where another starts - without a CHR$(0) to separate them! The new length would then count until the first CHR$(0), i.e. at the end of the nxt variable (perhaps!).
page 2