LIBRARY command (ver 22)

Oct 18, 2009
363
17
Several things about the new LIBRARY command:

1) The files don't require a particular extension. I tried a test file named LIBRARY_FILES.txt and it loaded.

Show_Library {
@echo off
Echo This is the Show_Libary function in LIBRARY_FILES.txt
pause
}


2) Contents of a function are autonomous.

That means that the function code for each function must begin with @echo off. If it doesn't, the commands will display, the same as if a batch file did not begin with that. I put @echo off before the function definition and it had no effect. (WAD)
 
May 20, 2008
12,165
133
Syracuse, NY, USA
Library functions do, however, respect
Code:
BatchEcho=No
which has been in my INI file for ~25 years. It's a lot easier to use
Code:
echo on
in the rare occasion when it's desired.
 
Oct 18, 2009
363
17
Passing parameters:

With_Params{
@echo off
Echo This is the With_Params function in LIBRARY_FILES.txt
echo %1
echo %2
echo %3
pause
}


Command line: With_Params ABC DEF GHI