FutureBasic Logo

<<    Index    >> FutureBasic

pstr$   statement

pstr$(addressVar) = PascalString

This statement changes the value of addressVar, setting it to the address of PascalString. addressVar must be a long-integer variable or a pointer variable; PascalString must be a string variable or a literal string in quotes.

If PascalString is a string variable, the pstr$ statement is equivalent to this:

addressVar = @PascalString

If PascalString is a literal string in quotes, then addressVar is set to an address in FutureBasic's heap where the literal string is stored. The pstr$ statement is the only way to obtain the address of a literal quoted string.

The pstr$ keyword can also be used with the read statement, to obtain the address of a string specified in a data statement.

See also
pstr$ function; read