Skip to content

SADD


Returns a pointer to a string variable's data

Syntax

vb
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

Usage

` result = Sadd( str )

`

Parameters

str

the 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.

Examples

start GeSHi

vb
Dim s As String

Print SAdd(s)
s = "hello"
Print SAdd(s)
s = "abcdefg, 1234567, 54321"
Print SAdd(s)

end GeSHi

Differences from QB

  • QB returned an integer instead of a pointer.

See also

  • Strptr
  • Varptr
  • Procptr

Back to DocToc

Translated from FreeBASIC official docs. Contact us for removal if infringed.
FreeBASIC is an open-source project, not affiliated with Microsoft