Define a primitive data type: Difference between revisions

Added Toka
(add E example)
(Added Toka)
Line 102:
 
Which is a check I expect you would have to do in any other language anyway to prevent the program from having problems if the user provided data out side the acceptable range.
 
==[[Toka]]==
[[Category:Toka]]
 
needs quotes
{
variable update
[ update @ [ ! ] [ @ ] ifTrueFalse update off ] is action
[ dup >r 0 11 r> within [ update on ] [ drop ." Out of bounds\n " ] ifTrueFalse ]
[ ` [ invoke cell-size malloc # ` action compile ` ] invoke is ]
} is value:1-10:
is to
value:1-10: foo
1 to foo
foo .
Anonymous user