return; stops a function execution.

Function One()
{
    If (!$var) {
        return;
    }
}

--

Julio Nobrega.

Um dia eu chego lá:
http://sourceforge.net/projects/toca

Ajudei? Salvei? Que tal um presentinho?
http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884


"Mauricio Cuenca" <[EMAIL PROTECTED]> wrote in message
00f501c1dbec$d8f11e90$0201a8c0@telesat56evlre">news:00f501c1dbec$d8f11e90$0201a8c0@telesat56evlre...
> Hello,
>
> I'm using recursive functions and call a function from inside another one.
> The problem is that when I call the Exit(); function the whole program is
> aborted. How can I quit just the current function, not the whole program ?
>
> <example>
> Function One()
> {
>     If (!$var) { Exit(); }
> }
>
> Function Two();
> {
>     One();    //This line kills the program
>     Print("Hello"); //This is not printed =(
> }
> </example>
>
> TIA,
>
> ______________________
> Mauricio Cuenca
>



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

Reply via email to