Basic questions
Posted: Thu Sep 04, 2003 1:32 pm
OK, I thought I might finally open up the toolkit and play with a few scripts.
But first, I got some basic questions.
You have a script xyz. And I see that there is a main() entry point to that script. I also see you can have other functions defined inside xyz, so for instance I have some 'utility functions' like IsBady() IsGoody(). I'm fine with that so far.
Question: Can these utility functions be called from other scripts?
Taking it one step further, is it possible to have a script that contains nothing but utility functions (i.e. the main() does nothing or doesn't exist)?
If not, then does this mean that for each script you make, it has be completely self-contained? Even if functions IsBady() and IsGoody() where used by other scripts?
Anyother useful comments on the "architecture of scripting" would also be useful.
Thanks in advance.
But first, I got some basic questions.
You have a script xyz. And I see that there is a main() entry point to that script. I also see you can have other functions defined inside xyz, so for instance I have some 'utility functions' like IsBady() IsGoody(). I'm fine with that so far.
Question: Can these utility functions be called from other scripts?
Taking it one step further, is it possible to have a script that contains nothing but utility functions (i.e. the main() does nothing or doesn't exist)?
If not, then does this mean that for each script you make, it has be completely self-contained? Even if functions IsBady() and IsGoody() where used by other scripts?
Anyother useful comments on the "architecture of scripting" would also be useful.
Thanks in advance.