home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_disks
/
100-199
/
ff146.lzh
/
DmeMacros
/
CommentedMacros
/
Pascal.IfElse.edrc
< prev
next >
Wrap
Text File
|
1988-05-28
|
2KB
|
46 lines
# insert lines for body of text; write marker in text to save location;
# move cursor up one line (may have to add a line if at the top) and move
# to the first character in the line (if there are no characters in the
# line, the cursor moves to the leftmost column;
repeat 7 insline `+' up firstnb
# if there is text on this line, insert a line between this line and the
# first line of the template;
if c>32 `down insline' down
# go down to end of template and insure that there is at least one blank
# line between it and any text below it;
repeat 7 down firstnb
if c>32 insline
# move back to marker and delete it;
repeat 7 up firstnb del
# write the body of the template; write 2 markers for later search & replace
# needed to complete comments with test expression; place cursor in position
# to write between parentheses in test expression;
`IF () THEN BEGIN' firstnb down down
`END (* IF + *)' firstnb down down
`ELSE BEGIN' firstnb down down
`END; (* ELSE + *)' findstr `) THEN' prev
# prompt for the test expression (it will printed as a string at the cursor
# location; goto first character of the expression and read text into the
# variable $scanf until you get to a blank; replace the markers in the
# comments with the text in $scanf; move to blank line between first BEGIN-
# END pair and indent for entry of next line of code;
escimm (` ) first find `(' right while c<=32 right scanf %s down findr `+' $scanf down findr `+' $scanf up up up up firstnb up tab