Leopold Toetsch <[EMAIL PROTECTED]> writes:
> Piers Cawley <[EMAIL PROTECTED]> wrote:
>> Leopold Toetsch <[EMAIL PROTECTED]> writes:
>
>>> Klaas-Jan Stol <[EMAIL PROTECTED]> wrote:
>>>> Hello,
>>>
>>>> I've bee
Piers Cawley <[EMAIL PROTECTED]> wrote:
> Leopold Toetsch <[EMAIL PROTECTED]> writes:
>> Klaas-Jan Stol <[EMAIL PROTECTED]> wrote:
>>> Hello,
>>
>>> I've been playing with closures and subs but I have a little bit of
>>&
Leopold Toetsch <[EMAIL PROTECTED]> writes:
> Klaas-Jan Stol <[EMAIL PROTECTED]> wrote:
>> Hello,
>
>> I've been playing with closures and subs but I have a little bit of
>> trouble with those.
>
> newsub $P0, .Closure, _foo
>
Klaas-Jan Stol <[EMAIL PROTECTED]> wrote:
> Thanks for your quick reactions.
You are welcome.
> Indeed, doing
> $P0(q)
> works ok. I'm a bit confused by syntax then (but I think it makes sense
> now, if IMCC sees the "(", it is expecting args I guess)
Yep. Function and method calls as well a
I now see I made some errors (I explain below)
First, I show the Lua code:
function newCounter ()
local i = 0
return function () -- anonymous function
i = i + 1
return i
end
end
c1 = newCounter()
print(c1()) --> 1
print(c1()) --> 2
This is the translation (and it works! :-)
.sub _
I haven't written PIR in a while, and I'm not terribly familiar with the
new changes, but I'll make some guesses.
Klaas-Jan Stol writes:
> function main()
>
>local p = 123;
>local q = 345;
>
>foo(q);
>foo(q);
>
>function foo(a) # nested function, it does have access to
Leopold Toetsch wrote:
Klaas-Jan Stol <[EMAIL PROTECTED]> wrote:
Hello,
I've been playing with closures and subs but I have a little bit of
trouble with those.
newsub $P0, .Closure, _foo
$P0(q)
newsub $P0, .Closure, _foo
$P0(q)
Closures have to be di
Klaas-Jan Stol <[EMAIL PROTECTED]> wrote:
> Hello,
> I've been playing with closures and subs but I have a little bit of
> trouble with those.
newsub $P0, .Closure, _foo
$P0(q)
newsub $P0, .Closure, _foo
$P0(q)
Closures have to be distinct.
leo
Klaas-Jan Stol wrote:
Hello,
I've been playing with closures and subs but I have a little bit of
trouble with those.
I'm a bit confused by all different flavours of syntax, I've been trying
to read and understand all documents concerning this subject, the most
useful was r
Hello,
I've been playing with closures and subs but I have a little bit of
trouble with those.
I'm a bit confused by all different flavours of syntax, I've been trying
to read and understand all documents concerning this subject, the most
useful was reading the test scripts. H
10 matches
Mail list logo