Postscript Operators 't'





timeout (error)

A time limit has been exceeded; that is, a PostScript language program has executed for too long or has waited too long for some external event to occur.

Execution of timeout is sandwiched between execution of two objects being interpreted in normal sequence. Unlike most other errors, occurrence of a timeout does not cause the object being executed to be pushed on the operand stack nor does it disturb the operand stack in any way.

The PostScript language does not define any standard causes for timeout errors. However, a PostScript interpreter running in a particular environment may provide a set of timeout facilities appropriate for that environment.

Troubleshooting index Postscript Index


token file token any true (if found)
false (if not found)
string token post any true (if found)
false (if not found)

reads characters from file or string, interpreting them according to the PostScript language syntax rules, until it has scanned and constructed an entire object.

In the file case, token normally pushes the scanned object followed by true. If token reaches end-of-file before encountering any characters besides white space, it closes file and returns false.

In the string case, token normally pushes post (the substring of string beyond the portion consumed by token), the scanned object, and true. If token reaches the end of string before encountering any characters besides white space, it simply returns false.

In either case, the any result is an ordinary object. It may be simple-an integer, real, or name-or composite-a string bracketed by (...) or a procedure bracketed by {...}. The object returned by token is the same as the object that would be encountered by the interpreter if the file or string were executed directly. However, token scans just a single object and it always pushes that object on the operand stack rather than executing it.

token consumes all characters of the token and sometimes the terminating character as well. If the token is a name or a number followed by a white-space character, token consumes the white-space character (only the first one if there are several). If the token is terminated by a special character that is part of the token-one of ), >, ], or }-token consumes that character, but no following ones. If the token is terminated by a special character that is part of the next token-one of /, (, <, [, or {-token does not consume that character, but leaves it in the input sequence. If the token is a binary token or a binary object sequence, token consumes no additional characters.

EXAMPLE:

(15(St1) {1 2 add}) token -> ((St1) {1 2 add}) 15 true
((St1) {1 2 add}) token -> ( {1 2 add}) (St1) true
( {1 2 add}) token -> ( ) {1 2 add} true
( ) token -> false


ERRORS: invalidaccess, ioerror, limitcheck, stackoverflow, stackunderflow, syntaxerror, typecheck, undefinedresult, VMerror

SEE ALSO: search, anchorsearch, read

Troubleshooting index Postscript Index


transform x y transform x' y'
x y matrix transform x' y'

With no matrix operand, transform transforms the user space coordinate (x, y) by CTM to produce the corresponding device space coordinate (x', y'). If the matrix operand is supplied, transform transforms (x, y) by matrix rather than by CTM.

ERRORS: rangecheck, stackunderflow, typecheck

SEE ALSO: itransform, dtransform, idtransform

Troubleshooting index Postscript Index


translate tx ty translate
- tx ty matrix translate matrix

With no matrix operand, translate builds a temporary matrix and concatenates this matrix with the current transformation matrix (CTM). Precisely, translate replaces the CTM by T x CTM. The effect of this is to move the origin of the user coordinate system by tx units in the x direction and ty units in the y direction relative to the former user coordinate system. The sizes of the x and y units and the orientation of the axes are unchanged.

If the matrix operand is supplied, translate replaces the value of matrix by T and pushes the modified matrix back on the operand stack. In this case, translate does not affect the CTM.

ERRORS: rangecheck, stackunderflow, typecheck


SEE ALSO: rotate, scale, concat, setmatrix

Troubleshooting index Postscript Index

true - true true

pushes a boolean object whose value is true on the operand stack. true is not an operator; it is a name in systemdict associated with the boolean value true.

ERRORS: stackoverflow

SEE ALSO: false, and, or, not, xor

Troubleshooting index Postscript Index

truncate num1 truncate num2

truncates num1 toward zero by removing its fractional part. The type of the result is the same as the type of the operand.

EXAMPLE:

3.2 truncate -> 3.0
-4.8 truncate -> -4.0
99 truncate -> 99

ERRORS: stackunderflow, typecheck

SEE ALSO: ceiling, floor, round, cvi

Troubleshooting index Postscript Index

type any type name
returns a name object that identifies the type of the object any. The possible names that type can return are as follows:
arraytype marktype
booleantype nametype
conditiontype nulltype
dicttype operatortype
filetype packedarraytype
fonttype realtype
gstatetype savetype
integertype stringtype
locktype

The name fonttype identifies an object of type fontID. It has nothing to do with a font dictionary, which is identified by dicttype the same as any other dictionary.

The returned name has the executable attribute. This makes it convenient to perform type-dependent processing of an object simply by executing the name returned by type in the context of a dictionary that defines all the type names to have procedure values (this is how == works).

The set of types is subject to enlargement in future revisions of the language. A program that examines the types of arbitrary objects should be prepared to behave reasonably if type returns a name that is not in this list.

ERRORS: stackunderflow

Troubleshooting index Postscript Index

typecheck (error)

Some operand's type is different from what an operator expects. This is probably the most frequent error encountered. It is often the result of faulty stack manipulation, such as operands supplied in the wrong order or procedures leaving results on the stack when they are not supposed to.

Certain operators require dictionaries or other composite objects as operands, constructed according to specific rules (for example, pattern dictionaries or user paths). A typecheck error can occur if the contents of such objects are of incorrect type or are otherwise malformed.

Troubleshooting index Postscript Index



Original file name: PSL2t.html