Help Center
Help CenterFreeBASIC

SAddfunction

Returns a pointer to a string variable's data

Memory Functionsfunctiondocumented

Syntax

Declare Function SAdd ( ByRef str As String ) As ZString Ptr
Declare Function SAdd ( ByRef str As WString ) As WString Ptr
Declare Function SAdd ( ByRef str As ZString ) As ZString Ptr

Parameters

NameDescription
strthe string expression or variable to get the address of

Return value


A pointer to the data associated with str.

Description


Returns the memory offset of the string data in the string variable.

Remarks

Usage


result = SAdd( str )

Differences from QB


  • QB returned an integer instead of a pointer.

See also


Example


Dim s As String



Print SAdd(s)

s = "hello"

Print SAdd(s)

s = "abcdefg, 1234567, 54321"

Print SAdd(s)


Reference

  • Documented in KeyPgSadd.html