✨ Add vartype related commands
This commit is contained in:
parent
de84b80f2e
commit
46cc93d326
10
ideas-1.sh
10
ideas-1.sh
@ -22,13 +22,21 @@ mov|set $1 $2
|
|||||||
# load $1 from root scope into current scope
|
# load $1 from root scope into current scope
|
||||||
glob|global|pub|public $1
|
glob|global|pub|public $1
|
||||||
|
|
||||||
# vartypes
|
# vartypes (constants containing string of vartype name)
|
||||||
null # null
|
null # null
|
||||||
true|false # bool
|
true|false # bool
|
||||||
eg. -44 27 287634 # int
|
eg. -44 27 287634 # int
|
||||||
eg. 4.0 -3.0 0.125 # float
|
eg. 4.0 -3.0 0.125 # float
|
||||||
eg. "bla" 'blub' # str
|
eg. "bla" 'blub' # str
|
||||||
|
|
||||||
|
# vartype($1) => $1
|
||||||
|
typ|type $1
|
||||||
|
|
||||||
|
# cast $1 to type $2 / to int
|
||||||
|
cst|cast $1 $2
|
||||||
|
cst|cast $1 int
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## MATH ##
|
## MATH ##
|
||||||
|
Reference in New Issue
Block a user