break(int n) and continue(int n)

Started by Rincewind, October 14, 2007, 12:40:22 AM

« previous - next »

0 Members and 1 Guest are viewing this topic.

FreeYourMind

What means 'tal vez' ?
Hhehheheh, it's a joke ;)

etiqueta: it's the same, don't work.
An example please  :D

SplinterGU

works...


import "mod_say";

begin

    say ( "Init" );

    if ( 1 )
        goto label;
    end

    say ( "I don't must displayed!" );

    return;

label:
    say ( "I'm label!" );

end


if you had made an example you had solved it!
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

FreeYourMind

Don't work, don't recognize the label.


IF (_key(_space, _key_down))
     GOTO label;
END

IF (_key(_space, _key_up))
     BREAK;
END

label: say("lol");


>:( Some import, declaration is missing ?

FreeYourMind

Your example works!!!!


Here is my example, don't work:


import "mod_say";
import "mod_key";

begin

    my_process();

LOOP

if (key(_esc))
    exit("");
END


FRAME;
END

end

PROCESS my_process()
BEGIN

say ( "Init" );

LOOP

  if (key(_space))
  GOTO label;
  END

  label: say("lol");

FRAME;
END

END


SplinterGU

#19
label must be aligned to margin left! :P
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

SplinterGU

works!


import "mod_video";
import "mod_say";
import "mod_key";
import "mod_proc";

begin

    my_process();

LOOP

if (key(_esc))
    exit("");
END


FRAME;
END

end

PROCESS my_process()
BEGIN

say ( "Init" );

LOOP

  if (key(_space))
  GOTO label;
  END

    frame;
continue;
label: say("lol");

FRAME;
END

END
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

FreeYourMind

Interesting error origin... It's posible to fix and ignore tabulation when using goto's ?

SplinterGU

It isn't an error... It's is intentional... must be...
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

SplinterGU

In other way, in this thread we talk only about a proposal GOTO syntax, the final GOTO syntax thread is other... I'll close this thread.
Download Lastest BennuGD Release: http://www.bennugd.org/node/2