
-----------------------------------
Jas
Mon May 23, 2005 2:08 pm

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:


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)



-----------------------------------
Cervantes
Mon May 23, 2005 2:26 pm


-----------------------------------
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
Mon May 23, 2005 6:44 pm


-----------------------------------
yep, that did the trick! thx (didn't use the foward or body commands though)

-----------------------------------
jamonathin
Mon May 23, 2005 8:00 pm


-----------------------------------
What'd you do, make two procedures that do the same thing?
