Variable size/Get: Difference between revisions

add RPL
m (Addded language identifier.)
(add RPL)
 
Line 1,255:
Size of list4 is : 7
Size of list5 is : 5
</pre>
 
=={{header|RPL}}==
Introduced only in 2003, the <code>BYTES</code> command returns both the checksum and the size of an object. Before, Hewlett-Packard provided a table in the user manual to do the math by yourself. Size can be not an integer, as objects are made of nibbles.
{{Works with|HP|49}}
« BYTES NIP » '<span style="color:blue">OBJSIZE</span>' STO
 
42 <span style="color:blue">OBJSIZE</span>
{ 1 2 3 "FOUR" (5,6) [7 8] } <span style="color:blue">OBJSIZE</span>
« BYTES NIP » <span style="color:blue">OBJSIZE</span>
{{out}}
<pre>
3: 6.5
2: 50
1: 20.5
</pre>
 
1,150

edits