Method cmp
cmp(Int32, Int32)
Compares the values at index a
and b
relative to the top of the stack.
Declaration
public int cmp(int a = 0, int b = 1)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | a | Relative index of the first stack entry. |
System.Int32 | b | Relative index of the second stack entry. |
Returns
Type | Description |
---|---|
System.Int32 | -1 – value at a is less than value at b. |
cmp(UInt32, UInt32)
Compares the values at index a
and b
as absolute indices in the stack.
Declaration
public int cmp(uint a, uint b)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | a | Absolute index of a stack entry. |
System.UInt32 | b | Absolute index of a stack entry. |
Returns
Type | Description |
---|---|
System.Int32 | -1 – value at a is less than value at b. |
Remarks
see: mark() for absolute indices.
cmp(UInt32)
Compares the value on top of the stack with the value at b as absolute index in the stack.
Declaration
public int cmp(uint b)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | b | Absolute index of a stack entry. |
Returns
Type | Description |
---|---|
System.Int32 | -1 – value on top of the stack is less than value at b. |
Remarks
see: mark() for absolute indices.
cmp(BigRational, BigRational)
Compares the BigRational value a
with the BigRational value b.
Declaration
public int cmp(BigRational a, BigRational b)
Parameters
Type | Name | Description |
---|---|---|
BigRational | a | A BigRational as first value. |
BigRational | b | A BigRational as second value. |
Returns
Type | Description |
---|---|
System.Int32 | -1 – a is less than b. |
cmp(BigRational)
Compares the value on top of the stack a with the BigRational value b.
Declaration
public int cmp(BigRational b)
Parameters
Type | Name | Description |
---|---|---|
BigRational | b | A BigRational as second value. |
Returns
Type | Description |
---|---|
System.Int32 | -1 – the value on top of the stack is less than b. |