SplitScript reference / Display

Display

capability

capability Display

Supports conversion to a user-facing textual representation.

An as String cast, string interpolation, print, and setVariable all display values through this single capability. Source records, enums, and opted-in standard-library containers fall back to their derived Debug representation when no exact Display.toString implementation exists.

Examples

Display a value without an explicit string conversion

let scoreText = `Score: {42}`

Implemented by

MemberDescriptionAvailable through
FileVersionA four-part numeric Windows executable version.
NoneStores the single unit value None.
StringStores ordinary immutable UTF-8 text in WebAssembly GC memory.
addressStores a process address.
boolStores a boolean value.
charStores one Unicode scalar value.
f32Stores a 32-bit floating-point number.
f64Stores a 64-bit floating-point number.
i16Stores a 16-bit signed integer.
i32Stores a 32-bit signed integer.
i64Stores a 64-bit signed integer.
i8Stores an 8-bit signed integer.
u16Stores a 16-bit unsigned integer.
u32Stores a 32-bit unsigned integer.
u64Stores a 64-bit unsigned integer.
u8Stores an 8-bit unsigned integer.

Methods

MemberDescriptionAvailable through
toStringConverts the receiver to its user-facing string representation.