-
abs: The
abs
operator returns the absolute value of a number. For example:-5 abs % Result: 5 3 abs % Result: 3
-
add: The
add
operator adds the top two numbers on the operand stack and pushes the result onto the stack. For example:3 4 add % Result: 7
-
aload: The
aload
operator loads an element from an array onto the operand stack. For example:[1 2 3] 1 aload % Result: 2
-
anchorsearch: The
anchorsearch
operator searches for an anchor point within a string. It's commonly used in text layout operations but doesn't have a simple example without a larger context. -
and: The
and
operator performs a bitwise AND operation on the top two integers on the operand stack. For example:5 3 and % Result: 1 (because 101 AND 011 = 001)
-
arc: The
arc
operator draws a circular arc. It requires parameters specifying the center, radius, start angle, and end angle of the arc. For example:100 100 50 0 90 arc % Draws a quarter circle from 0 to 90 degrees with center at (100, 100) and radius 50
-
arcn: Similar to
arc
, thearcn
operator draws a circular arc but in the opposite direction (clockwise). Example usage is similar toarc
. -
arct: The
arct
operator calculates the tangent of an angle. For example:1 1 arct % Result: 45 (the tangent of 1 radian)
-
arcto: The
arcto
operator creates a circular arc between two points, using a specified radius. It's used in path construction. An example usage requires specifying more parameters than can be shown here. -
array: The
array
operator creates an array with the specified number of elements. For example:3 array % Result: [null null null]
-
ashow: The
ashow
operator shows text with individual character spacing. It requires the array of character codes and the array of character advances to be on the stack. Example usage depends on the specifics of the text to be shown. -
astore: The
astore
operator stores elements into an array. It's often used withaload
. An example usage would involve populating an array with values. -
atan: The
atan
operator calculates the arctangent of a number. For example:1 1 atan % Result: 45 (the arctangent of 1/1)
-
awidthshow: The
awidthshow
operator shows text with individual character spacing and width. It requires the array of character codes, the array of character advances, and a width value to be on the stack. Example usage depends on the specifics of the text to be shown.