Variable size/Get: Difference between revisions

Variable size/Get en Yabasic
(Variable size/Get en BASIC256)
(Variable size/Get en Yabasic)
Line 1,401:
 
Numbers, booleans and the special value ''null'' are stored directly within the variable's storage location using a technique known as ''NaN tagging'' and are therefore unboxed. For everything else (strings, class instances, lists etc.) the variable's storage location stores a pointer to where the actual data resides on the heap.
 
=={{header|Yabasic}}==
<code>frnfn_size</code> return the size (in bytes) of one of the types available for foreign function calls.
<lang yabasic>print frnfn_size("uint8") //1
print frnfn_size("int8") //1
print frnfn_size("uint16") //2
print frnfn_size("int16") //2
print frnfn_size("uint32") //4
print frnfn_size("int32") //4
print frnfn_size("uint64") //8
print frnfn_size("int64") //8
print frnfn_size("float") //4
print frnfn_size("double") //8
print frnfn_size("char") //1
print frnfn_size("int") //4
print frnfn_size("short") //2</lang>
 
=={{header|zkl}}==
2,122

edits