Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 problem with "procedure" statement
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
yangmagic




PostPosted: 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
Sponsor
sponsor
TheOneTrueGod




PostPosted: 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




PostPosted: 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. Razz 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.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: