Right
Right(fmtString, flags), Right(fmtString), Right(STACK, flags), Right(STACK), Right(, flags), Right
parameters: format string for sprintf, flags for ViewExport
Stack | Position | Description |
---|---|---|
Stack(In) | Top | any |
Top 1 | n | |
Stack(Out) | Top | (Partial) character string |
As with the String statement, any data from the stack top is transformed into a character string, from which a substring containing the last n characters (counted from the right) is then formed. This appears as the result of the operation on the stack-top.
216114
For n ≤ -1 Right is defined as all characters from the right except the first n characters. In other words:
Right(-n) = Right(Cardinality - n)
5 "1234567890" Right // -> "67890"
(-2) "1234567890" Right // -> "34567890" (== 8 "..." Right)