On 12/26/2022 3:26 AM, M. Osman Talayman wrote:
Hello,

All .bat link files run the programs with 9 parameters (%1 - %9) I'm
guessing this is because a dos program can take a maximum of 9
parameters and by doing it this way, all program parameters should be
covered. Is that correct?

No, this is incorrect.

Batch files can pass as many parameters as you like (well, there's probably a limit, but I don't know what it is).

The %1 through %9 are those that are directly accessible to other batch files (although it could be programs too, but I am pretty sure programs aren't limited in this way), you can reach the other parameters in a batch file by using the shift command.  This moves the parameter list over, so that %9 becomes %8 and so on.  I'm not sure if %1 disappears, or wraps around to the end of the list.

In any case, 9 parameters are not all that can behandled, the process will vary on whether it's a program or another batch file reading the prameters, but the takeaway is that more than 9 parameters are supported.

I don't know anything about the .com files you're referring to, so can't answer the other questions.




_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to