[OT] [sdiy] IN your mind, what is ....
Magnus Danielson
cfmd at bredband.net
Wed Feb 4 22:42:14 CET 2004
From: "Forbes, William - EE - UK/Leamington" <william.forbes at luk-asg.com>
Subject: RE: [OT] [sdiy] IN your mind, what is ....
Date: Wed, 4 Feb 2004 15:38:44 -0000
Message-ID: <F9A6B2E6D192D411B3FD00508BE71F1601006585 at uk022011.emea.luk.com>
> I would like to point out that in C at least, goto labels are the only
> objects that have true function scope.
> Therefore it is not possible to jump outside of a function with the standard
> goto.
You are correct! I just checked with K&R and already back then they had it
"right". Thanks Bill, I learned something new today!
So, then gotos are stack-safe as they should be, and thus can't cause any
memory fragmentation (MCs argument). So, use them when applicable.
There is however a dangerous function in the C-library and for which MCs
comments still apply - the infamous long-jump. Now that function makes sense!
Long-jump is an accident waiting to happend.
Cheers,
Magnus
More information about the Synth-diy
mailing list