|
Awkl
|
Functions | |
| number | isTrue (any x) |
Check if variable is true: truthy of type number|bool | |
| number | isFalse (any x) |
Check if variable is false: falsy of type number|bool | |
| number | asUintN (number w, number n) |
| Convert a number to an unsigned integer of a specified bit width. | |
| number | asIntN (number w, number n) |
| Convert a number to a signed integer of a specified bit width. | |
| number | u64 (number n) |
| Convert a number to a 64-bit unsigned integer. | |
| number | u32 (number n) |
| Convert a number to a 32-bit unsigned integer. | |
| number | u16 (number n) |
| Convert a number to a 16-bit unsigned integer. | |
| number | u8 (number n) |
| Convert a number to a 8-bit unsigned integer. | |
| number | i64 (number n) |
| Convert a number to a 64-bit signed integer. | |
| number | i32 (number n) |
| Convert a number to a 32-bit signed integer. | |
| number | i16 (number n) |
| Convert a number to a 16-bit signed integer. | |
| number | i8 (number n) |
| Convert a number to a 8-bit signed integer. | |
| number | isUnassigned (any x) |
Check if variable is of type unassigned | |
| number | isNil (any x) |
Check if variable is of type unassigned. Alias for type::isUnassigned | |
| number | isUntyped (any x) |
Check if variable is of type untyped | |
| number | isNily (any x) |
Check if variable is of type unassigned or untyped | |
| number | isEmpty (any x) |
Check if variable is of type unassigned or untyped or string of length 0. | |
| number | isNull (any x) |
Check if variable is the null string i.e. of type string and of length 0. | |
| number | isZero (any x) |
Check if variable is of type number and of value 0. | |
| number | isNumber (any x) |
Check if variable is of type number | |
| number | isString (any x) |
Check if variable is of type string | |
| number | isBool (any x) |
Check if variable is of type number|bool | |
| number | isStrnum (any x) |
Check if variable is of type strnum | |
| number | isRegexp (any x) |
Check if variable is of type regexp | |
| number | isArray (any x) |
Check if variable is of type array | |
| number | isScalar (any x) |
Check if variable is of a primitive scalar type i.e. number, regexp, string, strnum, unassigned, number|bool | |
| number | isNumbery (any x) |
Check if variable is of type number, strnum or number|bool | |
| number | isNumeric (any x) |
Check if variable is of type number, strnum, number|bool or string that looks numeric. | |
| number | isStringy (any x) |
Check if variable is of type string or strnum | |
| number | isChar (any x) |
Check if variable is of type string and of length 1. | |
| number | isChary (any x) |
Check if variable is of type string or strnum and of length 1. | |
| number | isIndexedArray (any x, number i0=1) |
| Check if variable is an array with numerical correlative numbers as keys. | |
| number | is (any x, string t) |
Check if string is of a certain type. Either a gawk builtin type or that has a boolean function type::is* | |
| number | isType (string t) |
Check if string is one of gawk's builtin types or that has a type::is* function. | |
| number | isPrimitiveType (string x) |
Check if string is one of gawk's builtin types i.e. array, number, regexp, string, strnum, unassigned, untyped, number|bool | |
| number | isArrayOf (any A, string type) |
| Check if variable is an array of elements of a specific type. | |
| auto | areComparable (x, y) |
| number | number (scalar x) |
Convert variable to a number | |
| string | string (scalar x) |
Convert variable to a string | |
| regexp | regexp (scalar x) |
Convert variable to a regexp | |
| auto | bool (scalar x) -> number|bool |
Convert variable to a number|bool | |
| strnum | strnum (scalar x) |
Convert variable to a strnum | |
Variables | |
| bool | true = awk::mkbool(1) |
True: 1 of type number|bool | |
| bool | false = awk::mkbool(0) |
False: 0 of type number|bool | |
| number | U64_MAX = 0xFFFFFFFFFFFFFFFF |
| Maximum value for a 64-bit unsigned integer \(2^{64} - 1\). | |
| number | U32_MAX = 0xFFFFFFFF |
| Maximum value for a 32-bit unsigned integer \(2^{32} - 1\). | |
| number | U16_MAX = 0xFFFF |
| Maximum value for a 16-bit unsigned integer \(2^{16} - 1\). | |
| number | U8_MAX = 0xFF |
| Maximum value for a 8-bit unsigned integer \(2^{8} - 1\). | |
| unassigned | nil |
| Unassigned variable. | |
| auto type::areComparable | ( | x | , |
| y | ) |
Convert a number to a signed integer of a specified bit width.
| w | Bit-width |
| n | Number to convert |
w-bit signed integer representation of n, i.e. wrapped around \(\left[-2^{w-1}, 2^{w-1} - 1\right)\) Convert a number to an unsigned integer of a specified bit width.
| w | Bit-width |
| n | Number to convert |
w-bit unsigned integer representation of n, i.e. wrapped around \(\left[0, 2^{w} - 1\right)\) | auto type::bool | ( | scalar | x | ) | -> number|bool |
Convert variable to a number|bool
| x | Scalar value to convert |
number|bool Convert a number to a 16-bit signed integer.
| n | Number to convert |
n, i.e. wrapped around \(\left[-2^{15}, 2^{15} - 1\right)\) Convert a number to a 32-bit signed integer.
| n | Number to convert |
n, i.e. wrapped around \(\left[-2^{31}, 2^{31} - 1\right)\) Convert a number to a 64-bit signed integer.
| n | Number to convert |
n, i.e. wrapped around \(\left[-2^{63}, 2^{63} - 1\right)\) Convert a number to a 8-bit signed integer.
| n | Number to convert |
n, i.e. wrapped around \(\left[-2^{7}, 2^{7} - 1\right)\) | number type::isArray | ( | any | x | ) |
Check if variable is of type array
| x | Variable to check for its type |
array. 0 otherwise Check if variable is an array of elements of a specific type.
| A | Array to check |
| type | Type name |
| number type::isBool | ( | any | x | ) |
Check if variable is of type number|bool
| x | Variable to check for its type |
number|bool. 0 otherwise | number type::isChar | ( | any | x | ) |
Check if variable is of type string and of length 1.
| x | Variable to check for its type |
string and of length 1. 0 otherwise | number type::isChary | ( | any | x | ) |
Check if variable is of type string or strnum and of length 1.
| x | Variable to check for its type |
string or strnum and of length 1. 0 otherwise | number type::isEmpty | ( | any | x | ) |
Check if variable is of type unassigned or untyped or string of length 0.
| x | Variable to check for its type |
unassigned or untyped or string of length 0. 0 otherwise | number type::isFalse | ( | any | x | ) |
Check if variable is false: falsy of type number|bool
| x | Variable to check for its type |
number|bool. 0 otherwise Check if variable is an array with numerical correlative numbers as keys.
| x | Variable to check for its type |
| i0 | Starting index |
array with numerical correlative numbers as keys. 0 otherwise | number type::isNil | ( | any | x | ) |
Check if variable is of type unassigned. Alias for type::isUnassigned
| x | Variable to check for its type |
unassigned. 0 otherwise | number type::isNily | ( | any | x | ) |
Check if variable is of type unassigned or untyped
| x | Variable to check for its type |
unassigned or untyped. 0 otherwise x == 0 && x == "" | number type::isNull | ( | any | x | ) |
Check if variable is the null string i.e. of type string and of length 0.
| x | Variable to check for its type |
string and of length 0. 0 otherwise x == "" which is also thruthy for nily values | number type::isNumber | ( | any | x | ) |
Check if variable is of type number
| x | Variable to check for its type |
number. 0 otherwise | number type::isNumbery | ( | any | x | ) |
Check if variable is of type number, strnum or number|bool
| x | Variable to check for its type |
number, strnum or number|bool. 0 otherwise | number type::isNumeric | ( | any | x | ) |
Check if variable is of type number, strnum, number|bool or string that looks numeric.
| x | Variable to check for its type |
number, strnum, number|bool or string that looks numeric. 0 otherwise 123)+ or one minus - sign (e.g. +1, -1). by default (e.g. 0.1, .1)0,1) if using a respective available locale or LC_NUMERIC environment variable and the -N or --use-lc-numeric gawk option is used1e2, 1e+2, 1e-2, 1E+2)0xff, 0XFF) if the -n or --non-decimal-data gawk option is used -n or --non-decimal-data, numbers with leading zeros and that only have octal digits (01234567) will be interpreted in base 8, not base 10. strings are primarily those that can be coerced to an according number with arithmetic operations like +, -, *, /, etc., with the exception of those that have leading or trailing space characters. Check if string is one of gawk's builtin types i.e. array, number, regexp, string, strnum, unassigned, untyped, number|bool
| x | Type name |
array, number, regexp, string, strnum, unassigned, untyped or number|bool. 0 otherwise | number type::isRegexp | ( | any | x | ) |
Check if variable is of type regexp
| x | Variable to check for its type |
regexp. 0 otherwise | number type::isScalar | ( | any | x | ) |
Check if variable is of a primitive scalar type i.e. number, regexp, string, strnum, unassigned, number|bool
| x | Variable to check for its type |
number, regexp, string, strnum, unassigned, number|bool. 0 otherwise | number type::isString | ( | any | x | ) |
Check if variable is of type string
| x | Variable to check for its type |
string. 0 otherwise | number type::isStringy | ( | any | x | ) |
Check if variable is of type string or strnum
| x | Variable to check for its type |
string or strnum. 0 otherwise | number type::isStrnum | ( | any | x | ) |
Check if variable is of type strnum
| x | Variable to check for its type |
strnum. 0 otherwise | number type::isTrue | ( | any | x | ) |
Check if variable is true: truthy of type number|bool
| x | Variable to check for its type |
number|bool. 0 otherwise | number type::isUnassigned | ( | any | x | ) |
Check if variable is of type unassigned
| x | Variable to check for its type |
unassigned. 0 otherwise | number type::isUntyped | ( | any | x | ) |
Check if variable is of type untyped
| x | Variable to check for its type |
untyped. 0 otherwise | number type::isZero | ( | any | x | ) |
Check if variable is of type number and of value 0.
| x | Variable to check for its type |
number and of value 0. 0 otherwise x == 0 which is also thruthy for nily values and "0" strnums | number type::number | ( | scalar | x | ) |
Convert variable to a number
| x | Scalar value to convert |
number | regexp type::regexp | ( | scalar | x | ) |
Convert variable to a regexp
| x | Scalar value to convert |
regexp | string type::string | ( | scalar | x | ) |
Convert variable to a string
| x | Scalar value to convert |
string | strnum type::strnum | ( | scalar | x | ) |
Convert variable to a strnum
| x | Scalar value to convert |
strnum Convert a number to a 16-bit unsigned integer.
| n | Number to convert |
n, i.e. wrapped around \(\left[0, 2^{16} - 1\right)\) Convert a number to a 32-bit unsigned integer.
| n | Number to convert |
n, i.e. wrapped around \(\left[0, 2^{32} - 1\right)\) Convert a number to a 64-bit unsigned integer.
| n | Number to convert |
n, i.e. wrapped around \(\left[0, 2^{64} - 1\right)\) Convert a number to a 8-bit unsigned integer.
| n | Number to convert |
n, i.e. wrapped around \(\left[0, 2^{8} - 1\right)\) | bool type::false = awk::mkbool(0) |
False: 0 of type number|bool
| unassigned type::nil |
Unassigned variable.
| bool type::true = awk::mkbool(1) |
True: 1 of type number|bool
| number type::U16_MAX = 0xFFFF |
Maximum value for a 16-bit unsigned integer \(2^{16} - 1\).
| number type::U32_MAX = 0xFFFFFFFF |
Maximum value for a 32-bit unsigned integer \(2^{32} - 1\).
| number type::U64_MAX = 0xFFFFFFFFFFFFFFFF |
Maximum value for a 64-bit unsigned integer \(2^{64} - 1\).
| number type::U8_MAX = 0xFF |
Maximum value for a 8-bit unsigned integer \(2^{8} - 1\).