Reference Guide

Full Command and Function Reference 3-243
Access:
LIST SUB
( °is the left-shift of the Nkey).
Input/Output:
Level 3/Argument 1 Level 2/Argument 2 Level 1/Argument 3 Level 1/Item 1
[[ matrix ]]
1
n
startposition
n
endposition
[[ matrix ]]
2
[[ matrix ]]
1
{n
row
, n
column
}
n
endposition
[[ matrix ]]
2
[[ matrix ]]
1
n
startposition
{n
row
,, n
column
}
[[ matrix ]]
2
[[ matrix ]]
1
{n
row
, n
column
}
{n
row
,, n
column
}
[[ matrix ]]
2
string
target
n
startposition
n
endposition
string
result
{ list
target
}
n
startposition
n
endposition
{ list
result
}
grob
target
{ #n
1
, #m
1
}
{ #n
2
#m
2
}
grob
result
grob
target
( x
1
, y
1
)
( x
2
, y
2
)
grob
result
PICT
{ #n
1
, #m
1
}
{ #n
2
#m
2
}
grob
result
PICT
( x
1
, y
1
)
( x
2
, y
2
)
grob
result
Example 1:
{ A B C D E } 2 4 SUB
returns
{ B C D }
.
Example 2:
"ABCDE" 0 10 SUB
returns
"ABCDE"
.
Example 3:
PICT { # 10d #20d } { # 20d # 40d } SUB
returns
Graphic 11 x 21
.
See also: CHR, GOR, GXOR, NUM, POS, REPL, SIZE
SUBST
Type: Function
Description: Substitutes a value for a variable in an expression. The value can be numeric or an expression.
This is similar to the Where function, denoted by the symbol |, but SUBST substitutes without
evaluating the resulting expression.
Access: Algebra, …×L, P
ALG
Input: Level 2/Argument 1: An expression.
Level 1/Argument 2: The value or expression to be substituted.
Output: The expression with the substitution made.
Flags: Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
Radians mode must be set (flag –17 set).
Example: Substitute x = z+1 for x in the following expression, and apply the EXPAND command to
simplify the result:
x
2
3x 7+ +
Command:
SUBST(X^2+3*X+7,X=Z+1)
EXPAND(ANS(1))
Result:
Z^2+5*Z+11
See also: | (where command)
SUBTMOD
Type: Function
Description: Performs a subtraction, modulo the current modulus.
Access: Arithmetic,
MODULO
L