Conversion rules
| from \ to | bool | int | real | string | ptr |
|---|---|---|---|---|---|
| null | false | 0 | 0.0 | "null" | NULL |
| bool | - | 0/1 | 0.0/1.0 | "false"/"true" | NULL/0x1 |
| int | 0 => false, otherwise true | - | - | - | cast |
| real | 0.0 => false, otherwise true | round to nearest | - | sprintf %g | cast |
| string | empty => false, otherwise true | *1 | *1 | - | char* |
| func | true | 0 | 0.0 | "function" | NULL |
| cfunc | true | 0 | 0.0 | "C function" | NULL |
| object *2 | true | 0 | 0.0 | "object" | data ptr. |
| ptr | NULL => false, otherwise true | cast | cast | sprintf ptr(%p) | - |
| thread | true | cast | cast | sprintf thread(%p) | cast |
- "-" means the conversion is not necessary, does not affect data or the effect of conversion should be immediately obvious
- *1) see Numeric string parsing rules for more info
- *2) these are the default values, overrides can be provided in CONVERT function and type name for string
