The Dink Network

Reply to Re: Goto

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
June 7th 2003, 10:30 PM
pq_frog.gif
Ric
Peasant They/Them Canada
 
It is a bit safer to bracket the action of an if. Sometimes stacking the command works, but dink doesn't like it. Also when it does work, if &mom =0, it will goto ast, then continue and run bst too. Above all, when making comparison (using "if"), you must have a space before and after the <= or == or whatever.
hm...
void main ()
{
if (&mom < 2) { goto ast; }
if (&mom > 3) { goto bst; }
}
void separatethis ()
{
ast:
blah
return;
bst:
blahblah
}
you don't need to goto a separate procedure, but you must plan how command will end. And is &mom a global variable? (initiated in "start.c"), if not add int &mom; at the begining of main().