procedure inside procedure
Author |
Message |
Jas
|
Posted: 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
|
|
|
Cervantes
|
Posted: 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
|
Posted: 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
|
Posted: Mon May 23, 2005 8:00 pm Post subject: (No subject) |
|
|
What'd you do, make two procedures that do the same thing? |
|
|
|
|
|
|
|