lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Doug Rogers writes:
>eventually you'd have to convert back into a useful
>number. There's no
 
>getting around the fact that the
>problem is the lack
 
>of distinction between integer types
>and floating point types

If Lua represents a string as a contiguous sequence of bytes then an
"excerpt" of the right size (4 bytes, say) would contain the same byte
values as a machine integer, so there wouldn't be a problem from the C
point of view. I see what you mean, though - we shouldn't rely on a
particular implementation of a string (they might use rope structures or
something in Lua 6). There would need to be routines in the Lua C API to
retrieve the raw byte sequence from a string as an integer, float or
whatever.

&.


#####################################################################################
This e-mail message has been scanned for Viruses and Content and cleared 
by NetIQ MailMarshal.
The Blackpool Sixth Form College.
#####################################################################################