"String" (Compiled Type)

"String"

represents a string type specifier.

Details

  • "String" can be used in Typed and related constructs to specify a type.
  • "String" objects are automatically memory managed.

Properties

  • The characters stored in a "String" type value are the same as those in a String expression.

Constructors

Conversions

    Expressions

  • "String" objects can be converted to and from String expressions.
  • "CString"

  • Strings can be cast to "Managed"::["CString"] objects.

Examples

open allclose all

Basic Examples  (1)

"String" can be used as input and output from a CompiledCodeFunction:

Scope  (1)

Cast a string to a "Managed"::["CString"] and print its contents:

When a managed object is passed to a function from a library, the raw object is automatically unpacked.

When a managed object is no longer used, it frees its contents.

Possible Issues  (1)

A string can be cast to a "CString", but the result will need to be freed with a call to DeleteObject when it is no longer used: