06-30-2024, 07:44 AM
(translated by Google translator)
Hi, Elzaimer
In fact, in Small BASIC all variables have one type: primitive.
This type allows you to process a wide variety of data. But, for such versatility you have to pay with speed.
However, there are several methods that allow you to check the type of data that is in a variable.
Array.IsArray(array)
LDUtilities.IsNumber(input)
To avoid confusion, I always use a prefix in variable names.
n_varName => numeric
b_varName => boolean
s_varName => string
lis_varName => list
arr_varName => array
shp_varName => shape
and so on.
Hi, Elzaimer
In fact, in Small BASIC all variables have one type: primitive.
This type allows you to process a wide variety of data. But, for such versatility you have to pay with speed.
However, there are several methods that allow you to check the type of data that is in a variable.
Array.IsArray(array)
LDUtilities.IsNumber(input)
To avoid confusion, I always use a prefix in variable names.
n_varName => numeric
b_varName => boolean
s_varName => string
lis_varName => list
arr_varName => array
shp_varName => shape
and so on.