lua-users home
lua-l archive

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


On 02/22/11 14:11, Alex Queiroz wrote:
[...]
>      Nothing is never rolled back. This "rolling back" is not and has
> never been part of Scheme semantics. Maybe you should post an example
> to show when this "rolling back" takes place. What is a "scalar
> variable", anyway? Lists are just chainings of pairs, a fundamental
> data type, and are not special in any way.

I'm not a Scheme programmer, but I recognise his description from C. In
very approximate pseudocode:

{
    int i;
    int* j = malloc(sizeof(int));

    i = 1;
    *j = 1;

label = setjmp();

    i = 2;
    *j = 2;

    longjmp(label);
}

After the longjmp occurs, when execution resumes at label, i is now 1 as
the change has been lost, but *j is still 2, as it hasn't.

> [skipped nonsense]

I generally find 'I'm sorry, I don't understand what you're getting at'
a more productive response...

-- 
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│ "Thou who might be our Father, who perhaps may be in Heaven, hallowed
│ be Thy Name, if Name Thou hast and any desire to see it hallowed..."
│ --- _Creatures of Light and Darkness_, Roger Zelazny

Attachment: signature.asc
Description: OpenPGP digital signature