Re: GOTO's
From: Rick Thompson (nospam_at_nospam.com)
Date: 01/19/05
- Next message: Jim Thompson: "Re: [OT]: Rainwater Permit: "May I pretty-please have a drop of rain-water Uncle Sam?""
- Previous message: Kryten: "Re: Cambridge (UK) engineer seeking job and home in Cambridge"
- In reply to: Ken Smith: "Re: GOTO's"
- Next in thread: Ken Taylor: "Re: GOTO's"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 19 Jan 2005 15:28:03 +0000
On Wed, 19 Jan 2005 15:16:44 +0000 (UTC), kensmith@green.rahul.net
(Ken Smith) wrote:
>In article <pan.2005.01.19.06.23.14.112876@example.net>,
>Rich Grise <richgrise@example.net> wrote:
>[...]
>>And a "GOTO" at the end of it destroys your continuity. A Wend closes the
>>loop.
>
>"WEND" is short for "What the hell did that END" You have to put a comment
>on it to say what it ended.
>
>> A GOTO can go anywhere, and is more likely to leave crap on the
>>stack from the call it's pooping out of.
>
>Someone more expert in C will have to comment on this for C but in Pascal,
>no you can't. Jumps out of context are not allowed. Algol had the
>"thunk" method to handle the jump out of context. It is quite a good
>idea.
Not possible in C/C++. goto can only branch within a function, and
will clean up any stacks created by blocks that you leave.
setjmp/longjump are also stack-clean, by definition.
Rick
- Next message: Jim Thompson: "Re: [OT]: Rainwater Permit: "May I pretty-please have a drop of rain-water Uncle Sam?""
- Previous message: Kryten: "Re: Cambridge (UK) engineer seeking job and home in Cambridge"
- In reply to: Ken Smith: "Re: GOTO's"
- Next in thread: Ken Taylor: "Re: GOTO's"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|