Timeline for How many arguments were passed?
Current License: CC BY-SA 3.0
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Apr 11, 2018 at 12:36 | comment | added | Ismael Miguel | Yes, that's exactly it. Nice catch with the exit code! I was surprised to see that exitcodes can be larger than 255. An example is the list provided by Symantec: symantec.com/connect/articles/… | |
| Apr 11, 2018 at 11:32 | comment | added | Neil | @IsmaelMiguel Like this? (Note: I didn't include the function name in the byte count, but I did include the function return, which seems reasonable, as there needs to be one somewhere.) | |
| Apr 11, 2018 at 11:30 | history | edited | Neil | CC BY-SA 3.0 | added 293 characters in body |
| Apr 11, 2018 at 9:39 | comment | added | Ismael Miguel | I believe that this answer is answer goes (somewhat) against the rules. Batch has something somewhat close to functions. You can do something similar to :a|set r=0&for %%a in (%*)do set/ar+=1 (| = windows-style newline). This solution is 38 bytes. To execute it, do call :a <args> with a goto :eof before the function, being the value available inside the variable r. If you want to keep your solution, remove the /a on the first set, and remove those @. | |
| Apr 10, 2018 at 8:16 | history | answered | Neil | CC BY-SA 3.0 |