Posted: Wed May 17, 2006 7:55 pm Post subject: problem with "procedure" statement
how can i use such like:
procedure puzzle(1)
put "************"
put "************"
put "************"
end puzzle(1)
i know that's error... what statement i can use can be instead of it?...
Sponsor Sponsor
TheOneTrueGod
Posted: Wed May 17, 2006 8:02 pm Post subject: (No subject)
Er, please grammer check your posts, and post a clear question. The clearer the question, the better the help.
Also, use code tags when posting code, quote tags for quotes, etc...
If you intended the (1) to be a parameter, then you need to define a name, and a type for it, as such:
code:
procedure puzzle (x : int)
or
code:
procedure puzzle (var x : int)
if the (1) will serve no purpose, then you don't need it, and you only need
code:
procedure puzzle
put "****"
put "****"
put "****"
end puzzle
blaster009
Posted: Wed May 17, 2006 10:13 pm Post subject: (No subject)
TheOneTrueGod wrote:
Er, please grammer check your posts
Shame on your ironic grammar, Jeremy. Anyhow, he's completely right. Unless you're trying to use parameters in your procedure (which I don't think is the case here), you should omit the (1). Turing reads that as another piece of code, and because it isn't properly formatted, it will cause an error and crash.