File IO , . - "". , ( ), (
integertype realtype) ( , , marktype, ).
postscript:
%!
{ currentfile token pop /END-COMMENT eq {exit} if } loop
Each word here is read from the current file and converted
into a name object and compared to "/END-COMMENT".
It can have but does not need a preceeding slash.
This program produces an image of a snowman in a blizzard,
suitable for use as stationary.
END-COMMENT
showpage
: , ... .
:
(Some
multi-line
text)
pop
, .
loop.
{
} loop
.
/src (datafile) (r) file def
{
src readline
} loop
, . !
/src (datafile) (r) file def
{
src readline {
}{
exit
} ifelse
} loop
, true - , false (no-more-data) . readline . .
/src (datafile) (r) file def
/str 80 string def
{
src str readline {
processline
}{
pop exit
} ifelse
} loop
, (80 ) . Postscript, token (, , , , , ). get ( forall) . - search.
, , stdout .
/processline { % (line)
( ) { % (line) ( )
search { % (post) ( ) (pre)
=
}{ % (no-match)
=
exit
} ifelse
} loop
} def
, , . , , boolean; . search - , . , . "" ( , "", ( )) ; " ".
, , ?
, cvi cvr . -, print show ; cvn .