Postscript Operators 'L'




languagelevel - languagelevel int LEVEL 2

is an integer designating the PostScript language level supported by the PostScript interpreter. If the value of languagelevel is 2, the PostScript interpreter supports all PostScript Level 2 language features.
If the value of languagelevel is 1 or if languagelevel is not defined in

systemdict, the PostScript interpreter does not support all PostScript Level 2 language features.

ERRORS: stackoverflow, undefined

SEE ALSO: product, revision,

serialnumber, version


Troubleshooting index Back to Postscript index



le num1 num2 le bool
string1 string2 le bool

pops two objects from the operand stack and pushes the boolean value true if the first operand is less than or equal to the second, false otherwise. If both operands are numbers, le compares their mathematical values. If both operands are strings, le compares them element by element (treating the elements as integers in the range 0 to 255) to determine whether the first string is lexically less than or equal to the second. If the operands are of other types or one is a string and the other is a number, le executes the typecheck error.

ERRORS: invalidaccess, stackunderflow,

typecheck

SEE ALSO: lt, eq, ne,

ge, gt


Troubleshooting index Back to Postscript index



length array length int
packedarray length int
dict length int
string length int
name length int

depends on the type of its operand. If the operand is an array, packed array, or string, length returns the number of elements in its value. If the operand is a dictionary, length returns the current number of key-value pairs it contains, as opposed to its maximum capacity, which is returned by maxlength. If the operand is a name object, the length is the number of characters in the text string that defines it.

EXAMPLE:

[1 2 4] length -> 3
[] length -> 0 % An array of zero length
/ar 20 array def ar length -> 20

/mydict 5 dict def
mydict length -> 0
mydict /firstkey (firstvalue) put
mydict length -> 1

(abclength -> 4 % The "is one character
() length -> 0 % No characters between ( and )
/foo length -> 3

ERRORS: invalidaccess, stackunderflow,

typecheck

SEE ALSO: maxlength


Troubleshooting index Back to Postscript index



limitcheck (error)

An implementation limit has been exceeded
(for example, too many files have been opened simultaneously or a path has become too complex).

Troubleshooting index Back to Postscript index



lineto x y lineto

- appends a straight line segment to the current path . The line extends from the current point to the point (x, y) in user space; (x, y) then becomes the current point. If the current point is undefined because the current path is empty, lineto executes the error nocurrentpoint.

ERRORS: limitcheck, nocurrentpoint,

stackunderflow, typecheck

SEE ALSO: rlineto, moveto,

arc, curveto,

closepath


Troubleshooting index Back to Postscript index



ln num ln real

returns the natural logarithm (base e) of num. The result is a real.

EXAMPLE:

10 ln -> 2.30259
100 ln -> 4.60517

ERRORS: rangecheck, stackunderflow,

typecheck

SEE ALSO: log, exp


Troubleshooting index Back to Postscript index



load key load value

searches for key in each dictionary on the dictionary stack, starting with the topmost (current) dictionary. If key is found in some dictionary, load pushes the associated value on the operand stack. If key is not found in any dictionary on the dictionary stack, load executes the error undefined.

load looks up key the same way the interpreter looks up executable names that it encounters during execution. However, load always pushes the associated value on the operand stack; it never executes that value.

EXAMPLE:

/avg /{

add 2 div} def
/avg load -> /{

add 2 div}

ERRORS: invalidaccess, stackunderflow,

typecheck, undefined

SEE ALSO: where, get,

store


Troubleshooting index Back to Postscript index



lock - lock lock DPS

creates a new lock object, unequal to any lock object already in existence, and pushes it on the operand stack. The state of the lock is initially free .

Since a lock is a composite object, creating one consumes VM. The lock's value is allocated in local or global VM according to the current VM allocation mode .

ERRORS: stackoverflow, VMerror

SEE ALSO: monitor, wait

Troubleshooting index Back to Postscript index



log num log real

returns the common logarithm (base 10) of num. The result is a real.

EXAMPLE:

10 log -> 1.0
100 log -> 2.0

ERRORS: rangecheck, stackunderflow,

typecheck

SEE ALSO: ln, exp


Troubleshooting index Back to Postscript index



loop proc loop

- repeatedly executes proc until proc executes the exit operator, at which point interpretation resumes at the object next in sequence after the loop. Control also leaves proc if the stop operator is executed. If proc never executes exit or stop, an infinite loop results, which can be broken only via an external interrupt (see interrupt).

ERRORS: stackunderflow, typecheck

SEE ALSO: for, repeat,

forall, exit


Troubleshooting index Back to Postscript index


lt num1 num2 lt bool
string1 string2 lt bool

pops two objects from the operand stack and pushes the boolean value true if the first operand is less than the second, false otherwise. If both operands are numbers, lt compares their mathematical values. If both operands are strings, lt compares them element by element (treating the elements as integers in the range 0 to 255) to determine whether the first string is lexically less than the second. If the operands are of other types or one is a string and the other is a number, lt executes the typecheck error.

ERRORS: invalidaccess, stackunderflow,

typecheck

SEE ALSO: le, eq, ne,

ge, gt


Troubleshooting index Back to Postscript index





Original file name: PS.html