Skip to content
Paul Squires edited this page Oct 19, 2026 · 2 revisions

Home › Memory Functions › SAdd

SAdd

Returns a pointer to the characters of a string.

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

  • str

Description

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

Return Value

A pointer to the data associated with str.

Remarks

Usage

result = SAdd( str )

Differences from QB

  • QB returned an integer instead of a pointer.

See also

Examples

Dim s As String

Print SAdd(s)

s = "hello"

Print SAdd(s)

s = "abcdefg, 1234567, 54321"

Print SAdd(s)

Category: Memory Functions
Kind: function


Reproduced from the FreeBASIC Wiki Manual under the GNU Free Documentation License 1.3 — with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. Copyright © the FreeBASIC project and wiki contributors. See License.

Clone this wiki locally