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

Username:   Password: 
 RegisterRegister   
 procedure inside procedure
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Jas




PostPosted: Mon May 23, 2005 2:08 pm   Post subject: procedure inside procedure

is there a way u can have a procedure inside a procedure. cuz im making a button thats suppsoed to go to a procedure, that will include a file (include "filename") which has procedures in it. but it wont work becuase you cant have procedures inside a procedure. Any way to solve this?

example:

code:

procedure edit
include "filename.t"  % "filename" has many procedures in it"
end edit

var button1:int

button1 := GUI.CreateButtonFull (80, 150, 2, "Edit customers",
    edit, 50, GUI.NONE, false)

Sponsor
Sponsor
Sponsor
sponsor
Cervantes




PostPosted: Mon May 23, 2005 2:26 pm   Post subject: (No subject)

Yeah, you don't want to make your procedures inside another procedure, you only want to call them from inside your procedure. To do this, you have to make sure that the procedure you're calling is declared before the line that it is called at. If this is impossible (ie. you've got two procedures calling each other), use the forward and body commands. Check the help file for those.
Jas




PostPosted: Mon May 23, 2005 6:44 pm   Post subject: (No subject)

yep, that did the trick! thx (didn't use the foward or body commands though)
jamonathin




PostPosted: Mon May 23, 2005 8:00 pm   Post subject: (No subject)

What'd you do, make two procedures that do the same thing?
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  [ 4 Posts ]
Jump to:   


Style:  
Search: