SourcePoint AMD Help

Table of Contents

right

Extract a number of characters from the end of a string.

Syntax

[result =] right(string-expr, n)

Where:

result

specifies an nstring variable to which the function return value is assigned. If result is not specified, the return value is displayed on the next line of the screen.

string-expr

specifies an nstring variable or string constant.

n

specifies the number of characters to extract.

Discussion

The right command returns a substring from the end of a string. If the number of characters to extract is greater than the length of the string, then the entire string is returned.

Example

Command input:

define nstring month = "January"
define nstring temp = right(month, 3)
temp

Result:

"ary"

Related Topics: