type, subtype, vtype, vsubtype
The function type returns one of the following string values:
The function subtype returns one of the following string values:
Vectorization: The function names beginning with the prefix v support vectorization in the 1st function parameter.
Instead of providing a single value, you can provide a set or even a nested set which contain multiple values.
The function will then process every value and its return value contains a corresponding set containing all results.
Note:For these functions, you need add the prefix letter 'v' in front of the function name. Otherwise
the function recognizes a set and attempts to process sets and not strings.
Indirect parameter passing is disabled
1
No. | Type | Description |
---|---|---|
1 input |
all types | Value Value to be converted as described above. For function names vtype and vsubtype, vectorization applies if a set is provided. |
Type | Description |
---|---|
string set |
Type of value See main function desription. If vectorization is used, then a set containing the results is returned. |
a[num 1] = 1;
a[num 2] = a[num 1] + 0;
a[lit 1] = Plain text;
a[lit 2] = 'A softquoted string';
a[lit 3] = "A quoted string";
a[lit 4] = soft( a[lit 3] );
a[date] = date(today);
a[bool] = true;
a[pset] = { 1,2,3 };
a[void] = null();
for all variables( a[], value[], counter[], name[] )
{
echo( name[], ": ", value[], " --> ", type( value[] ), ", ", subtype( value[] ) );
}
bool: true --> boolean, boolean
date: 2024-10-19 --> date, plain date
lit 1: Plain text --> string, softquoted string
lit 2: A softquoted string --> string, softquoted string
lit 3: A quoted string --> string, quoted string
lit 4: A quoted string --> string, softquoted string
num 1: 1 --> numeral, numeral
num 2: 1 --> numeral, plain numeral
pset: {1,2,3} --> set, set
void: # Invalid Value # --> void, void