[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: enhance fh:read?
- From: Björn De Meyer <bjorn.demeyer@...>
- Date: Fri, 17 Jan 2003 12:24:31 +0100
Markus Huber wrote:
> Is it possible to enhance fh:read() in Lua-Code itself?
> Now I use this:
> Word= string.byte(Filehandle:read(1))*256
> But I would prefer this way:
> (Please no discussion about Word 16 or 32 bit ;-)
I guess that that would be unportable.
On a big endian architecture, or reading from a file
that is big-endian, I think you'll have to
Lua uses only ANSI C, so it cannot know anything about
"No one knows true heroes, for they speak not of their greatness." --
Björn De Meyer