home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
beehive
/
zcat
/
if14.lbr
/
IF14.DQC
/
IF14.DOC
Wrap
Text File
|
1991-01-30
|
4KB
|
117 lines
Program: IF.COM
Modification Date : 09-Dec-85
Modified By: Jay Sage
Previous Version: 1.3
This Version: 1.4
NOTES ON VERSION 1.4 BY JAY SAGE
I have modified the IF NULL test to look at the command line tail so that itì
can properly detect the following non-null conditions:
IF NULL D: IF NULL U: IF NULL DU: IF NULL DIR:
Previous versions of IF.COM looked for a name in the second default fileì
control block. In the four above cases, there would be no name even thoughì
a second token was present on the command line.
I recommend using version 1.5 of SYSFCP and patching IF.COM so that itsì
internal option names begin with an X for eXtended or eXternal (patch theì
option strings in the table at the beginning of the program and also in theì
built-in help screen). For example, if you rename 'NU' to 'XU', then youì
can perform the test IF NULL if you are not concerned with the U: form ofì
the second token (SYSFCP15 already took care of the other three problemì
forms), or you can perform the test IF XULL if you want to be able to handleì
the user-number-only case.
NOTES ON VERSION 1.3 BY JAY SAGE
I made two modifications to version 1.2 to make version 1.3. First I
corrected the error in the test IF ERROR. Because the code mistakenly used
the SYSLIB routine GETER1 instead of GETER2, it was testing the error
handler flag instead of the program error flag. In addition, the sensing of
the flag was reversed (a problem that has existed throughout ZCPR3).
Second, I enhanced the IF INPUT function so that any text in the tail will
be used as a prompt. For example, the command "IF INPUT ASSEMBLE" will
result in a screen display of "ASSEMBLE (Y/N)? ". If there is no text after
the IF option, then the code performs as before.
NOTES ON VERSION 1.2 BY CHUCK MCMANIS
I made one small modification to the IF.COM file to allow it to successfully
compare wild card characters and ambiguous file names (AFNs). This allowed
some added flexibility in some aliases I am using. I have used this version
for several days and have not found any incompatibilities with the previous
version. The change only affects the following use of the IF command :
IF fcb1=fcb2
This change allows fcb2 to be an AFN and still set the IF state to true when
a match occurs so that the following statement will be accepted :
IF $1=*.?Q? ; NOTE sets condition to TRUE is $1 is a squeezed file.
Either fcb1 or fcb2 or both can contain ? or * characters to be ambiguous.
An example of the use of this new condition is shown in the follwing aliases
that I use to manipulate a library with all of the ZCPR3 utility sources in
it.
Alias: GET - Retrieves the source form the SOURCES library
Usage: GET name
Statement Comments
--------- --------
IF $1=*; Matches filename with no type.
IF EX $1.MAC; Checks to see if it exists
ECHO FILE EXISTS!; And does not overwrite if it does
ELSE;
EXTRACT $1.MQC; Gets named file from the library
FI;
ELSE;
ECHO PLEASE DO NOT INCLUDE FILETYPE.;
FI
Alias: PUT - Stores the source back into the SOURCES library, or adds new
sources to the library.
Usage: PUT name [E]
Where E indicates the external files should be erased on completion.
Statement Comments
--------- --------
IF $1=*; Matches filename with no type.
IF EX $1.MAC; Checks to see if it exists
SQ $1.MAC; Squeeze it before storing
INSERT $1.MQC; Insert it into the library
IF $2=E; See if they want them erased
ERA $1.M?C; Erase Squeezed and Unsqueezed copies
FI;
ELSE;
ECHO $1.MAC NOT FOUND Tell them we couldn't find it
FI;
ELSE; Syntax reminder
ECHO PLEASE DO NOT INCLUDE FILETYPE.;
FI
Alias: INSERT - Insert files into the SOURCES library
Usage: INSERT name.typ
Statement Comments
--------- --------
NULU -O SOURCES -A $1 -X Add the file and exit
Alias: EXTRACT - Extract files from the SOURCES library
Usage: EXTRACT name.typ
Statement Comments
--------- --------
NULU -O SOURCES -Q $1 -X Extract the file unsqueezingì
if
necessary