home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 25
/
CD_ASCQ_25_1095.iso
/
dos
/
tools
/
par330
/
exampl15.pom
< prev
next >
Wrap
Text File
|
1995-09-06
|
2KB
|
68 lines
;
; NOTE: A quick-reference summary of POM commands appears in EXAMPL04.POM
;
;-------------------------------------------------------------------------------
;
; First, we must obtain the input file name.
;
; $COMMAND will look something like this:
; C:\POM\POM.EXE EXAMPL15.POM EXAMPL01.TXT EXAMPL15.LST
;
; Thus, we want to parse out what is between the second and third spaces.
;
SET cmd = $COMMAND
PARSE fname cmd "2* " "3* "
;
; Skip this file if it isn't one of the ones we want.
; We do this using a "does not contain" comparison.
;
NEXTFILE "XMPDAT01.TXT XMPDAT04.TXT XMPDAT07.TXT" ~ fname
;
; Output the file name at the beginning of a new input file.
; Note that lastcmd is null ("") until it is first set.
;
BEGIN cmd <> lastcmd
SOUND "BIP"
;
; Get the input file name and set up the underline
;
SETLEN flen fname
SET uline = ""
PAD uline "L" "-" flen
;
; Unless this is the first file, output three linefeeds.
;
OUTEND lastcmd <> "" |
OUTEND lastcmd <> "" |
OUTEND lastcmd <> "" |
;
; Output the title (i.e. the file name)
;
OUTEND |{fname}
OUTEND |{uline}
OUTEND |
SET lastcmd = $COMMAND
END
;
; Allow null lines
;
MINLEN "0"
;
; The file XMPDAT07.TXT contains tab characters, so we will replace
; each one with two spaces.
;
BEGIN fname = "XMPDAT07.TXT"
CHANGE $FLINE $TAB " "
;
; On lines with an even number of characters in the first column,
; we end up with an extra space in column 23, so we will remove it.
;
BEGIN $FLINE[23] = " "
APPEND $FLINE $FLINE[1 22] $FLINE[24 80]
END
END
;
; Output the file data
;
OUTEND |{$FLINE}