How to create a DOS function ? (known also as a subroutine)

Card Puncher Data Processing

About

functions in dos are:

Example

CALL :function arguments

:function
REM exit the subroutine 
goto :EOF

where:

  • arguments are the argument of the subroutine
  • goto :eof exit the subroutine





Discover More
Card Puncher Data Processing
DOS ErrorLevel - How to manage errors with the exit code ?

This article shows you how to manage error handling with the exit code of DOS. In dos: When the errorlevel is: * = 0, then No Error occurred * > 0, then an error occurred You can test if with...
Card Puncher Data Processing
Dos - Call (Subroutine, function)

The command “call” calls: one batch script passing the (variable|execution) context (the environment variable) a label (ie function) START where: argument The CALL command now accepts...
Card Puncher Data Processing
Dos - Command line (Argument|Parameter)

Command line arguments for DOS are passed to: the batch script through the cmd or call command: the function (subroutine) through the call command: variablesIf Defined Variable statement “”...



Share this page:
Follow us:
Task Runner