TypeKindNull
#const TypeKindNull: i32 = 0The kind of empty text, 0. Text of only spaces is TypeKindStr, not this.
import types
func main:
each s in ["42", "3.5", "true", "hello", ""]:
k := types.KindOf(s)
println "[" + s + "]",
k,
types.KindName(k),
types.IsInt(s),
types.IsFloat(s),
types.IsNumeric(s),
types.IsBool(s)
end
println types.KindOf("7") == types.TypeKindInt,
types.TypeKindNull,
types.TypeKindBool,
types.TypeKindFloat,
types.TypeKindStr
end[42] 2 int true false true false [3.5] 3 float false true true false [true] 1 bool false false false true [hello] 4 string false false false false [] 0 null false false false false true 0 1 3 4