The main difference between command line mode and interactive mode is that command line commands (i.e. commands that begin with a "-") are implemented first and objects and libraries are loaded later. Commands have a deferred effect and can appear anywhere in the command line or script file and in any order. For example,
slink myprog.obj -file:test
slink -file:test myprog.obj
have exactly the same effect. In the latter case, specifying -file:test first, tells SLINK that the filename will be TEST.EXE but no immediate action is taken on the file command.
Interactive mode commands are implemented immediately, where appropriate. For example, placing the following commands in a script file:
will have different effects.
The first script will do as expected, load an object file called MYPROG.OBJ and produce an executable from it called TEST.EXE.
The second script will terminate with an error since the SLINK session is always terminated in interactive mode by file and at that point no object files have been loaded.