[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: executing pcall results into devision by zero
- From: Marten Feldtmann <itlists@...>
- Date: Tue, 22 Jul 2008 07:58:07 +0200
I'm working on a wrapper for LUA for VASmalltalk and I downloaded a
version of Lua (which needs the VS2005 runtime) - I think, it was the
Windows distribution. (I'm working under Vista)
First I noticed, that I was not able to call the lua5.1.dll, because it
was said, that I call the c runtime in an incorrect way - after changing
the manifest of my executable I was allowed to call the library. That is
not very convenient.
But that's another story.
My main problem in understanding: When I executed with "loadstring" and
"pcall" the program "a = 2 / 0" I got an division by zero exception -
shouldn't pcall catch all errors ???
Then I build my own lua5.1.dll using Watcom 1.7a (I needed not only the
cdecl calling conventions functions, but also stdcall calling-convention
functions) and now pcall works as (I) expected and in "a" is something
stored like "1.#inf".
What is the behaviour of pcall in this aspect ?
Any idea ?