| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Tue May 13, 2008 5:01 pm Post subject: Call Functions - documentation |
|
|
I donīt understand what this mean in the dokumentation
"Although a function cannot contain definitions of other functions"
Does it mean that I canīt Call another function/functions from one function?
If You Can - How many level?
Ex:
I have problem to Call another functions from one function.
(If a program (DOS) was running, I want to close the program before a new session (DOS) is started.)
This work for me - a function call outside the function
EndProgram(progname)
StartProgram(15)
ExitApp
StartProgram(Sec)
{
....
Start a new session of the program
....
}
EndProg(WindowName)
{
.....
}
This doesnīt work for me - a function call inside the function
StartProgram(15)
ExitApp
StartProgram(Sec)
{
EndProgram(progname)
....
Start a new session of the program
....
}
EndProg(WindowName)
{
.....
}[/b] |
|
| Back to top |
|
 |
TheIrishThug
Joined: 19 Mar 2006 Posts: 361
|
Posted: Tue May 13, 2008 6:52 pm Post subject: |
|
|
The documentation means that you can not define a function inside another function, like this. | Code: | func1()
{
msgbox, inside 1
func2()
{
msgbox, inside 2
}
} |
Calling one function from withing another function works fine. You should check to see what the exact differences are between your two implementations. |
|
| Back to top |
|
 |
|