I would like to know the most efficient method (or even the least efficient, but working method!) to return a string when a program does not receive any arguments but expects some.
For example, I have a small program called "twobytwo" that takes two arguments - lead and gold.
How do I get stata to return "usage: twobytwo lead gold" if I just type twobytwo with no arguments?
I have tried testing "`1'" for null value, to no avail.
I don't find anything akin to argc of C
any suggestions would be welcome.
Thanks
Joe
For example, I have a small program called "twobytwo" that takes two arguments - lead and gold.
How do I get stata to return "usage: twobytwo lead gold" if I just type twobytwo with no arguments?
I have tried testing "`1'" for null value, to no avail.
I don't find anything akin to argc of C
any suggestions would be welcome.
Thanks
Joe

Comment