OK, now you can do:
call xxx.ash( 1, toast, " this is my string! ", true )
The CLI's argument parsing is very simple minded:
- Take the text between the first ( and the last ) and split it at commas (so no embedded commas in strings)
- "trim" each string (removes leading and trailing spaces).
- If a string both starts and ends with a ", remove the quotes (so you CAN have leading or trailing spaces in strings)
- pass an array of strings to ASH along with the script filename
ASH looks up the main() function and parses each string in order as the appropriate datatype. If any parameter parse fails, it aborts execution. If the user supplied too many arguments, the script aborts. If the user supplied too few arguments, ASH will prompt for the missing ones.
I also souped up ASH's prompting for main() parameters, in general. If the user hits the Cancel button for any prompt, the script aborts. If the user gives an unparsable value (bad item name, whatever), ASH prints an error and reprompts.
call xxx.ash( 1, toast, " this is my string! ", true )
The CLI's argument parsing is very simple minded:
- Take the text between the first ( and the last ) and split it at commas (so no embedded commas in strings)
- "trim" each string (removes leading and trailing spaces).
- If a string both starts and ends with a ", remove the quotes (so you CAN have leading or trailing spaces in strings)
- pass an array of strings to ASH along with the script filename
ASH looks up the main() function and parses each string in order as the appropriate datatype. If any parameter parse fails, it aborts execution. If the user supplied too many arguments, the script aborts. If the user supplied too few arguments, ASH will prompt for the missing ones.
I also souped up ASH's prompting for main() parameters, in general. If the user hits the Cancel button for any prompt, the script aborts. If the user gives an unparsable value (bad item name, whatever), ASH prints an error and reprompts.