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

Re: My First Computer



In article <28143.KVVNCQVW@news.telusplanet.net>,
Simon Williams  <*email*@*luddite.ca*> wrote:
 
> Funny, one of the things that made Applesoft click for me was the line
> numbering combined with the GOTO statement. 
> 
> 10 PRINT "HELLO"
> 20 GO TO 10
> 
> That's graspable on a purely intuitive level (at least for me), whereas
> other languages that I'd previously attempted (applescript, metal, real
> basic, etc) seemed much less obvious.
> 
> Well, I may not be a 'programmer' per se, but I have written quite a few
> short programs that I find quite useful, and by golly I do use alot of
> GOTOs.
 
You could write spaghetti programs in a lot of other languages too.
Your program above would, in C, become:
 
main()
{
again:  printf( "Hello\n" );
        goto again;
}
 
but of course virtually any actual C programmer would prefer this:
 
main()
{
    for(;;)
        printf( "Hello\n" );
}
 
That too will produce an endless loop.
 
 
> -- 
> Simon Williams
> Luddite Enterprises
> http://www.luddite.ca
 
:-)
 
-- 
----------------------------------------------------------------
Paul Schlyter,  Swedish Amateur Astronomer's Society (SAAF)
Grev Turegatan 40,  S-114 38 Stockholm,  SWEDEN
e-mail:  pausch at saaf dot se
WWW:     http://hem.passagen.se/pausch/index.html
         http://home.tiscali.se/~pausch/