FYI:  c and c++ do have goto

-----Original Message-----
From: JSheble [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 12, 2002 3:29 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] GOTO command. Doest it exist?


I sure hope I'm not going to stir up any trouble, but why exactly would you
need a GOTO statement?  Many languages have no such construct because the
ability to use functions or routines makes GOTO statements obsolete.  They
are most likley only in VB because it's a legacy thing, but AFAIK C, C++,
and some of the more less known languages such as Clipper, FORCE do not have
GOTO statements.  They haven't been missed either.

>>-----Original Message-----
>>From: David Robley [mailto:[EMAIL PROTECTED]]
>>Sent: Tuesday, June 11, 2002 9:32 PM
>>To: [EMAIL PROTECTED]
>>Subject: Re: [PHP] GOTO command. Doest it exist?
>>
>>
>>In article <001901c21190$c2ffc4e0$0100007f@localhost>,
>>[EMAIL PROTECTED] says...
>>> Many will tell you that the goto command is extinct.  It isn't,
>>it's just
>>> evolved into the function command.  What you do now is create a
>>function:
>>>
>>> function some_name($variable,$other_variable,...)
>>>     {
>>>     some code here;
>>>     }
>>>
>>> then, call it using :
>>>
>>> call_user_func('some_name',$variable,$other_variable,...)
>>>
>>> It's just like goto, it goes to a specified code block and then
>>returns to
>>> the line below the call, but takes more typing.
>>> Hope this helps.
>>> Hugh
>>
>>What you have described is more like a gosub.
>>
>>Goto jumps execution to the specified point in the code and
>>continues from
>>there. It does not automatically return to the line after the goto call.
>>
>>--
>>David Robley
>>Temporary Kiwi!
>>
>>Quod subigo farinam
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>>
>>---
>>Incoming mail is certified Virus Free.
>>Checked by AVG anti-virus system (http://www.grisoft.com).
>>Version: 6.0.370 / Virus Database: 205 - Release Date: 6/5/2002
>>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.370 / Virus Database: 205 - Release Date: 6/5/2002


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to