picklish
Member
I'm admittedly still new here, but I've read all the docs and this is still unclear to me. If this is a case of RTFM, then please point me to the appropriate FM. 
Use case: I have a script with a function in it. Let's call this function "void doStuff(int times)".
Is there anyway to call this function from the CLI or does it have to be in an ASH script?
If it is in an ASH script, is there any way to just #include/import that script in another script to use that function?
If neither of those are possible, then it seems like I have to put this function in some dostuff.ash file by itself and then add a "void main(int times)" function that calls the doStuff function. However, how do I then call this function (either from the command line or from another ASH script) and pass along the parameters on the command line? "call dostuff.ash 3" doesn't work. Finally, "call dostuff.ash" just prompts me with the GUI (yuck).

Use case: I have a script with a function in it. Let's call this function "void doStuff(int times)".
Is there anyway to call this function from the CLI or does it have to be in an ASH script?
If it is in an ASH script, is there any way to just #include/import that script in another script to use that function?
If neither of those are possible, then it seems like I have to put this function in some dostuff.ash file by itself and then add a "void main(int times)" function that calls the doStuff function. However, how do I then call this function (either from the command line or from another ASH script) and pass along the parameters on the command line? "call dostuff.ash 3" doesn't work. Finally, "call dostuff.ash" just prompts me with the GUI (yuck).