Goto or Gosub function?
Displaying 1-2 of 2 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
ErayMan

1. Can ya use a Goto or Gosub fonction like there is in Qbasic?:

While(!b1)
{
PrintString(0,"blabla");
if (Up)
{
Goto(20); // well something like that
}
ShowPage();
}
Text("yay!"); // supposing that this is line 20

(p.s. This is just an example, not the real code)





Beans are an excellent source of proteines! So please, be nice with them ...

Posted on 2001-01-03 20:43:03

andy

Instead of having a bit long list of code, (a la BASIC) VC is arranged into functions. There's your GOSUB equivalent.

There is no GOTO. (and I doubt there ever will be)

void DoSomething()
{
 Notify("woah! STuff happened!");
}

void Notify(string s)
{
 unpress(0);
 while (!b1)
  {
   render();
   gotoxy(screenx/2,screeny/2);
   printstring(0,s);
   updatecontrols();
   showpage()
  }
 unpress(0);
}



'Never confuse a single defeat with a final defeat.' -F. Scott Fitzgerald

Posted on 2001-01-03 21:27:10


Displaying 1-2 of 2 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.