The Program.Argumentcount statement returns the number of arguments given in the call of the program.
If you write a program test.sb and compile it by running you get a test.exe in the same directory.
if you start a cmd window in Windows, goto the smallbasic directory and execute the exe file by calling test.exe 2 4 6 ,
the argumentcount becomes 3, you can use the argument(s) through e.g. Program.GetArgument(2) which is then 4
I just don't understand how ArgumentCount works
Palma Colapietro
136
Reputation points
In the Small Basic Program class contains the property ArgumentCount.
How does it work ?
BS
Accepted answer
-
WhTurner 1,611 Reputation points
2021-07-15T13:42:05.067+00:00
1 additional answer
Sort by: Most helpful
-
Palma Colapietro 136 Reputation points
2021-07-15T19:25:07.91+00:00 So it is only about the program launch parameters, it is not about the body of the code itself. Quite right ?