Command: encode

Syntax

encode <ident> {,<message> ... }

Description

Write a list of values to a string identifier.

Parameters

Switches

Notes

If there are no output list items, no action will be taken.

If <ident> does not exist it will be created using current scope rules.

Each output list grouping will create one element in <ident>, thus multiple output items will treat <ident> as a string array.

Examples

Create a 3-element string array.

encode s, 'A','B','C'

Create a single string identifier containing 'A,B,C'.

encode s, <'A','B','C'>, -del=','

Create a single string identifier with formatted numeric values.

numeric x,y,z
encode s, <x,y,z>, -fmt="%8.2f %g %10.4e"

Create a string identifier containing the hexadecimal value of a numeric identifier (integerised).

numeric x = 28
encode s, x, -fmt='%0x'

See Also

Commands:

decode