Details of Icon Functions P through R
Produces the leftmost element of L and removes it from L, but fails if L
is empty; synonym for get(L).
See also: get(), pull(), push(), and put()
Produces &pos if &pos = i1, but fails otherwise.
See also: &pos and &subject
Produces a procedure corresponding to the value of x, but fails if x does
not correspond to a procedure. If x is the string name of an operator, i
specifies the number of arguments: 1 for unary (prefix), 2 for binary (infix),
and 3 for ternary. proc(x,0) produces the built-in function named x even
if the global identifier having that name has been assigned another value.
proc(x,0) fails if x is not the name of a function.
Default:
i 1
See also: args()
Produces the rightmost element of L and removes it from L, but fails if
L is empty.
See also: get(), pop(), push(), and put()
Pushes x1, x2, ... onto the left end of L. Values are pushed in order from
left to right, so xn becomes the first (leftmost) value on L. push(L) with
no second argument pushes a null value onto L.
See also: get(), pop(), pull(), and put()
Puts x1, x2, ... onto the right end of L. Values are pushed in order from
left to right, so xn becomes the last (rightmost) value on L. put(L) with
no second argument puts a null value onto L.
See also: get(), pop(), pull(), and push()
Produces the next line from f, but fails on end of file.
Default:
f &input
See also: reads()
Produces a string consisting of the next i characters from f, or the remaining
characters of f if fewer remain, but fails on an end of file. In reads(),
unlike read(), line termination sequences have no special significance.
reads() should be used for reading binary data. See also: read()
Defaults:
f &input
i 1
Produces a real number resulting from type conversion of x, but fails if
the conversion is not possible.
See also: integer() and numeric()
Removes (deletes) the file named s, but fails if s cannot be removed.
See also: rename()
Renames the file named s1 to be s2, but fails if the renaming cannot be
done.
See also: remove()
Produces a string consisting of i concatenations of s1.
Produces a string consisting of the reversal of s.
Produces a string of size i in which s1 is positioned at the right, with
s2 used for padding on the left as necessary.
Defaults:
i 1
s2 " " (blank)
See also: center() and left()
Produces the degree equivalent of r1 given in radians.
See also: dtor()
Terminates program execution with error i and offending value x.
Default:
x no offending value