WhoCares357
2008-04-05 15:09:50
What is the variable type in Scar that is used for the GoTo condition.
This works kinda like this: You declare the variable gotoHere (as what type I do not know). Then when you use it in the beginning of the script. You later call on it to go to that exact position of the script where you defined it.
I know Scar has something like this because I have used it before. I just forgot the syntax for it.
In C++, it would go something like this:
In scar it should be something like
I'm probably wrong, but that's my best shot at it.
This works kinda like this: You declare the variable gotoHere (as what type I do not know). Then when you use it in the beginning of the script. You later call on it to go to that exact position of the script where you defined it.
I know Scar has something like this because I have used it before. I just forgot the syntax for it.
In C++, it would go something like this:
// goto loop example
#include <iostream>
using namespace std;
int main ()
{
int n=10;
loop: //define it here
cout << n << ", ";
n--;
if (n>0) goto loop; //use it here
cout << "FIRE!\n";
return 0;
}In scar it should be something like
program New;
var
gotoHere: (datatype);
begin
gotoHere:
//do stuff
goto gotoHere;
end.I'm probably wrong, but that's my best shot at it.