lua-users home
lua-l archive

Re: Lua 4.0 (alpha) available, read patterns

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


At 12:02 -0300 on 26-04-00, Luiz Henrique de Figueiredo wrote:
 >From: Jon Kleiser <jon.kleiser@usit.uio.no>
 >I have now built a PowerMac Lua 4.0 (alpha) application, and that was
 >really easy. The only warning that CodeWarrior Pro 5 gave me, was
 >about some possibly superfluous ";" at the end of a simple while
 >line, which I ignored.
Could you please send us the exact location so that we can se if it's something
that can be "fixed"?
The message I got was:
 Warning : possible unwanted ';'
 print.c line 175 while (*p++!=OP_END);
It's about print.c in /src/luac, which I later removed from my (interpreter) project.
 >As I tried to run one of my bigger scripts, I got the "error: read
 >patterns are deprecated" message. My script used read(fileRef,
 >"....") to read four bytes.
Now you can use read(fileRef,4) to read 4 bytes!
Nice! But I can't find it in the docs ... ;-)
 >I've found
 > #define read_pattern(L, f, p) (lua_error(L, ...
 >in the file liolib.c, but can somebody please tell me what to do with
 >this line to enable the old read patterns ...?
You have to #define LUA_COMPAT_READPATTERN to enable the old read patterns.
It says so in "config", but I guess you're not using "make".
--lhf
Thanks. I may try that one of these days.
/Jon
---------------------------------------------------------------------------
Jon Kleiser / ADB-seksjonen / USIT / University of Oslo / Norway
Mail: Jon.Kleiser@usit.uio.no / Tel: +47-22 85 28 04 / Fax: +47-22 85 29 70
---------------------------------------------------------------------------

AltStyle によって変換されたページ (->オリジナル) /