Watson
#6
(16 Feb 11, 07:53AM)V-Man Wrote: Sections of AC code should be part of the Jeopardy trivia.
Answer: These 23 lines of code give rise to the main way CubeScripts are stored in memory.

Question: What is
void alias(const char *name, const char *action)
{
    ident *b = idents->access(name);
    if(!b)
    {
        ident b(ID_ALIAS, newstring(name), newstring(action), persistidents, execcontext);
        idents->access(b.name, b);
    }
    else if(b->type==ID_ALIAS)
    {
        if(contextisolated[execcontext] && execcontext > b->context)
        {
            conoutf("cannot redefine alias %s in this execution context", b->name);
            return;
        }
        if(b->action!=b->executing) delete[] b->action;
        b->action = newstring(action);
        if(b->persist!=persistidents) b->persist = persistidents;
    }
    else conoutf("cannot redefine builtin %s with an alias", name);
}

COMMAND(alias, ARG_2STR);

Probably about lies. Wow, that is as confusing as economy.
Thanks given by:


Messages In This Thread
Watson - by CyberKlown28 - 15 Feb 11, 02:22AM
RE: Watson - by Lantry - 15 Feb 11, 03:48AM
RE: Watson - by Gibstick - 15 Feb 11, 03:49AM
RE: Watson - by V-Man - 16 Feb 11, 07:53AM
RE: Watson - by Ronald_Reagan - 17 Feb 11, 01:25AM
RE: Watson - by #M|A#Wolf - 18 Feb 11, 05:05AM
RE: Watson - by Impakt'd - 18 Feb 11, 09:27PM
RE: Watson - by Reborn - 18 Feb 11, 08:32PM
RE: Watson - by Brahma - 19 Feb 11, 03:29AM
RE: Watson - by vonunov - 19 Feb 11, 03:44AM