Post Reply 
HP 50g Program Bytes
06-29-2014, 03:34 PM
Post: #1
HP 50g Program Bytes
Hello,

The program size on my last post was 181 bytes using the BYTES command. Why does the filer show 173 bytes?

Regards,

Mark
Find all posts by this user
Quote this message in a reply
06-29-2014, 04:24 PM
Post: #2
RE: HP 50g Program Bytes
(06-29-2014 03:34 PM)MNH Wrote:  The program size on my last post was 181 bytes using the BYTES command. Why does the filer show 173 bytes?

Because the actual size of the object in question is 173.5 bytes, and the Filer is showing that figure (truncated).

BYTES can be invoked with either the actual object on the stack, or the name of the object on the stack.

I'm guessing that you invoked it with a name ('<object name>') instead of the actual object (<< ... >>). The larger size reported by BYTES in that case is showing the total bytes occupied by both the object and the name.

To see BYTES report the smaller number, recall the actual program object to the stack (right-shift then the menu key is a quick way to do this). Now execute BYTES and you should see the smaller number.

Here's the description of BYTES from the Advanced User's Guide:
Quote:Byte Size Command: Returns the number of bytes and the checksum for the given object.
If the argument is a built-in object, then the size is 2.5 bytes and the checksum is #0.
If the argument is a global name, then the size represents the name and its contents, while the
checksum represents the contents only. The size of the name alone is (3.5 + n), where n is the
number of characters in the name.

Regards -
David
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 2 Guest(s)