MOO-cows Mailing List Archive


Re: LPMOO Questions

On Thu, 30 Nov 1995, Matt Pauker wrote:

> I don't claim to be an expert on such things (Far from it, in fact), but
> this seems pretty correct to me.  For example, in ASCII form, to represent
> the letter 'A', it's simply an 'A'.  In binary, though, it's 00200001.  (If
> that's wrong, which it probably is, sorry...I know that adds up to 65,
> which is the ASCII value for 'A', but I'm not sure if there's extra
> information to denote a character.)  00200001 is 7 'characters' longer than
> 'A', which could account for the size of binary files.

Actually, it's more like, in an ascii file, it does not save the length 
of a string... it just puts the string there.  In a binary file, it 
stores the length of a string, as well as the string itself... since 
strings/lists/etc can be soooo big, there is a large descriptor for size.

Also, storing a '1' in ASCII is 4 bytes:  <type-of-variable>, <enter>, 
1, <enter>   In binary, $maxint takes up as many bytes as 1.

- Kipp


Home | Subject Index | Thread Index