Postscript Operators 'e'


echo bool echo
- specifies whether the special files %lineedit and %statementedit are to copy characters from the standard input file to the standard output file. This affects only the behavior of executive; it does not apply to normal communication with the PostScript interpreter.
echo is not defined in products that do not support executive.

ERRORS: stackunderflow, typecheck

SEE ALSO: executive, file

Troubleshooting index Postscript Index


eexec file eexec
string eexec -

causes the contents of file (open for reading) or string to be decrypted and then executed in a manner similar to the exec operator. The decryption operation does not cause the file or string to be modified.

eexec creates a new file object that serves as a decryption filter on the specified file or string. It pushes the new file object on the execution stack, making it the current file for the PostScript interpreter. Subsequently, each time the interpreter reads a character from this file, or a program reads explicitly from currentfile, the decryption filter reads one character from the original file or string and decrypts it.

The decryption filter file is closed automatically when the end of the original file or string is encountered. It may also be closed explicitly by closefile. If the file passed to eexec was currentfile, this resumes direct execution of that file with the decryption filter removed. The file may consist of encrypted text followed by unencrypted text if the last thing executed in the encrypted text is currentfile closefile.

Before beginning execution, eexec pushes systemdict on the dictionary stack. This ensures that the operators executed by the encrypted program have their standard meanings. When the decryption filter file is closed either explicitly or implicitly, the dictionary stack is popped. The program must be aware that it is being executed with systemdict as the current dictionary; in particular, any definitions that it makes must be into a specific dictionary rather than the current one, since systemdict is read-only.

The encrypted file may be represented in either binary or hex; the eexec operator can decrypt it without being told which type it is. The recommended representation is hex, because hex data can be transmitted through communication channels that are not completely transparent. Regardless of the representation of the encrypted file, the encryption and decryption processes are transparent. That is, an arbitrary binary file can be encrypted, transmitted as either binary or hex, and decrypted to yield
the original information.

The encryption employed by eexec is intended primarily for use in Type 1 font programs. The book Adobe Type 1 Font Format contains a complete description of the encryption algorithm and recommended uses of eexec.

ERRORS: dictstackoverflow, invalidaccess,

invalidfileaccess, limitcheck,

stackunderflow, typecheck

SEE ALSO: exec, filter


Troubleshooting index Back to Postscript index



end - end -

pops the current dictionary off the dictionary stack, making the dictionary below it the current dictionary. If end tries to pop the bottommost instance of userdict, it executes the error dictstackunderflow.

ERRORS: dictstackunderflow

SEE ALSO: begin, dictstack,

countdictstack


Troubleshooting index Back to Postscript index



eoclip - eoclip -

intersects the inside of the current clipping path with the inside of the current path to produce a new, smaller current clipping path. The inside of the current path is determined by the even-odd rule, while the inside of the current clipping path is determined by whatever rule was used at the time that path was created.

Except for the choice of insideness rule, the behavior of eoclip is identical to that of clip.

ERRORS: limitcheck

SEE ALSO: clip, clippath,

initclip


Troubleshooting index Back to Postscript index



eofill - eofill -

paints the inside of the current path with the current color, using the even-odd rule to determine what points are inside. Except for the choice of insideness rule, the behavior of eofill is identical to that of fill.

ERRORS: limitcheck

SEE ALSO: fill, ineofill,

ueofill


Troubleshooting index Postscript Index


eoviewclip - eoviewclip LEVEL 2

is similar to viewclip, except that it uses the even-odd rule to determine the inside of the current path.

ERRORS: limitcheck

SEE ALSO: viewclip

Troubleshooting index Back to Postscript index



eq any1 any2 eq bool

pops two objects from the operand stack and pushes the boolean value true if they are equal, false if not. The definition of equality depends on the types of the objects being compared. Simple objects are equal if their types and values are the same. Strings are equal if their lengths and individual elements are equal. Other composite objects (arrays and dictionaries) are equal only if they share the same value. Separate values are considered unequal, even if all the components of those values are the same.

Some type conversions are performed by eq. Integers and reals can be compared freely: An integer and a real representing the same mathematical value are considered equal by eq. Strings and names can likewise be compared freely: A name defined by some sequence of characters is equal to a string whose elements are the same sequence of characters.

The literal/executable and access attributes of objects are not considered in comparisons between objects.

EXAMPLE:
4.0 4 eq -> true % A real and an integer may be equal
(abc) (abc) eq -> true % Strings with equal elements are equal

(abc) /abc eq -> true % A string and a name may be equal
[1 2 3] dup eq -> true % An array is equal to itself
[1 2 3] [1 2 3] eq -> false % Distinct array objects not equal

ERRORS: invalidaccess, stackunderflow

SEE ALSO: ne, le,

lt, ge, gt


Troubleshooting index Back to Postscript index



erasepage - erasepage -

% different in the NeXT implementation

This standard PostScript operator has the following effect in the NeXT implementation of the Display PostScript system: It erases the entire window to opaque white.

erases the entire current page by painting it with gray level 1, which is ordinarily white, but may be some other color if an atypical transfer function has been defined. The entire page is erased, regardless of the clip path currently in force. erasepage affects only the contents of raster memory. It does not modify the graphics state nor does it cause a page to be transmitted to the output device.

erasepage is executed automatically by showpage after imaging. There are few situations in which a PostScript language page description should execute erasepage explicitly, because the operator affects portions of the current page outside the current clip path. It is usually more appropriate to erase just the inside of the current clip path (see

clippath). Then the page description can be embedded within another, composite page without undesirable effects.

ERRORS: invalidid

SEE ALSO: showpage, clippath,

fill, copypage


Troubleshooting index Back to Postscript index



errordict - errordict dict

pushes the dictionary object errordict on the operand stack . errordict is not an operator; it is a name in systemdict associated with the dictionary object.

ERRORS: stackoverflow

SEE ALSO: $error

Troubleshooting index Back to Postscript index



exch any1 any2 exch any2 any1

exchanges the top two elements on the operand stack.

EXAMPLE:
1 2 exch -> 2 1

ERRORS: stackunderflow

SEE ALSO: dup, roll,

index, pop


Troubleshooting index Back to Postscript index



exec any exec -

pushes the operand on the execution stack, executing it immediately. The effect of executing an object depends on the object's type and literal/executable attribute. In particular, executing a literal object will cause it only to be pushed back on the operand stack. Executing a procedure, however, will cause the procedure to be called.

EXAMPLE:
(3 2 add) cvx exec -> 5
3 2 /add exec -> 3 2 /add
3 2 /add cvx exec -> 5

In the first line, the string (3 2 add) is made executable and then executed. Executing a string causes its characters to be scanned and interpreted according to the PostScript language syntax rules.

In the second line, the literal objects 3, 2, and /add are pushed on the operand stack, then exec is applied to the add. Since the add is a literal name, executing it simply causes it to be pushed back on the operand stack. The exec in this case has no useful effect.

In the third line, the literal name /add on the top of the operand stack is made executable by cvx. Applying exec to this executable name causes it to be looked up and the add operation to be performed.

ERRORS: stackunderflow

SEE ALSO: xcheck, cvx,

run


Troubleshooting index Back to Postscript index



execform form execform - LEVEL 2

paints a form specified by a form dictionary . The graphical output produced by execform is defined by the form dictionary's PaintProc procedure.

If this is the first invocation of execform for form, execform first verifies that the dictionary contains the required entries. Then it adds an entry to the dictionary with the key Implementation, whose value is private to the implementation. Finally, it makes the dictionary read-only. (execform performs these alterations directly to the operand dictionary; it does not copy the dictionary.)

When execform needs to call the PaintProc procedure, it pushes the form dictionary on the operand stack, then executes the equivalent of

gsave % Operand stack: dict
dup /Matrix get concat
dup /BBox get aload pop % Stack: dict llx lly urx ury
exch 3 index sub
exch 2 index sub % Stack: dict llx lly width height
rectclip % Also does a newpath
dup /PaintProc get % Stack: dict proc
exec % Execute PaintProc with dict on stack
grestore

The PaintProc procedure is expected to consume the dictionary operand and to execute a sequence of graphics operators to paint the form. The PaintProc must always produce the same output, given the same graphics state parameters, independent of the number of times it is called and independent, for example, of the contents of userdict. The PostScript language program should not expect any particular execution of execform to cause execution of the specified PaintProc.

The documented errors are those produced directly by execform. Obviously, the PaintProc can cause other errors.

ERRORS: limitcheck, rangecheck,

stackunderflow, typecheck,

undefined, VMerror

SEE ALSO: findresource


Troubleshooting index Back to Postscript index



execstack array execstack subarray

stores all elements of the execution stack into array and returns an object describing the initial n-element subarray of array, where n is the current depth of the execution stack. execstack copies the topmost object into element n-1 of array and the bottommost one into element 0 of array. The execution stack itself is unchanged.
If the length of array is less than the depth of the execution stack, execstack executes a rangecheck error.

ERRORS: invalidaccess, rangecheck,

stackunderflow, typecheck

SEE ALSO: countexecstack, exec


Troubleshooting index Back to Postscript index



execstackoverflow (error)

The execution stack has grown too large; procedure invocation is nested deeper than the PostScript interpreter permits.

SEE ALSO: exec

Troubleshooting index Back to Postscript index



execuserobject index execuserobject - LEVEL 2

executes the object associated with the non-negative integer index in the

UserObjects array. execuserobject is equivalent to:

userdict /UserObjects get
exch get exec

execuserobject's semantics are similar to those of exec or other explicit execution operators. That is, if the object is executable, it is executed; otherwise, it is pushed on the operand stack.

If UserObjects is not defined in userdict because defineuserobject has never been executed, an undefined error occurs. If index is not a valid index for the existing UserObjects array, a rangecheck error occurs. If index is a valid index but defineuserobject has not been executed previously for that index, a null object is returned.

ERRORS: invalidaccess, rangecheck,

stackunderflow, typecheck , undefined

SEE ALSO: defineuserobject, undefineuserobject,

UserObjects


Troubleshooting index Back to Postscript index



executeonly array executeonly array
packedarray executeonly packedarray
file executeonly file
string executeonly string

reduces the access attribute of an array, packed array, file, or string object to execute-only .Access can only be reduced by these means, never increased. When an object is execute-only, its value cannot be read or modified explicitly by PostScript operators (an invalidaccess error will result), but it can still be executed by the PostScript interpreter-for example, by invoking it with exec.
executeonly affects the access attribute only of the object that it returns. If there are other composite objects that share the same value, their access attributes are unaffected.

ERRORS: invalidaccess, stackunderflow,

typecheck

SEE ALSO: rcheck, wcheck,

xcheck, readonly,

noaccess


Troubleshooting index Back to Postscript index



executive - executive -

invokes the interactive executive, which facilitates direct user interaction with the PostScript interpreter.

executive uses the special %statementedit file to obtain commands from the user . The echo operator and the value of prompt also affect the behavior of executive.

executive is not necessarily defined in all products.
It should not be considered a standard part of the PostScript language.

ERRORS: undefined

SEE ALSO: prompt, echo,

file


Troubleshooting index Back to Postscript index



exit - exit -

terminates execution of the innermost, dynamically enclosing instance of a looping context without regard to lexical relationship. A looping context is a procedure invoked repeatedly by one of the following control operators:

cshow forall

pathforall

filenameforall kshow

repeat

for loop resourceforall

exit pops the execution stack down to the level of that operator. The interpreter then resumes execution at the next object in normal sequence after that operator.

exit does not affect the operand or dictionary stacks. Any objects pushed on those stacks during execution of the looping context remain after the context is exited.

If exit would escape from the context of a run or stopped operator, it executes the invalidexit error (still in the context of the run or stopped). If there is no enclosing looping context, the interpreter prints an error message and executes the built-in operator quit. This never occurs during execution of ordinary user programs, because they are enclosed by a stopped context.

ERRORS: invalidexit

SEE ALSO: stop, stopped


Troubleshooting index Back to Postscript index



exitserver - exitserver -

Troubleshooting index Back to Postscript index



exp base exponent exp real

raises base to the exponent power. The operands may be either integers or reals. If the exponent has a fractional part, the result is meaningful only if the base is non-negative. The result is always a real.

EXAMPLE:
9 0.5 exp -> 3.0
-9 -1 exp -> -0.111111

ERRORS: stackunderflow, typecheck,

undefinedresult

SEE ALSO: sqrt, ln,

log, mul


Troubleshooting index Back to Postscript index




Original file name: PSL2e.html