Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

LIBRARY command (ver 22)

Oct
364
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)
 
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.
 
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
 
Back
Top