Equinox Online Help - Language Reference - A to Z
Right [Function] |
|
---|---|
Applies to | |
Syntax | Right(StringExpression, SectionExpression) |
Action | [Function] Returns the right most portion of a string. |
Scope | Usable anywhere. |
Notes | This function returns the right most portion of StringExpression. SectionExpression defines the number of characters that are returned. You cannot return characters beyond the maximum size of StringExpression (remember that trailing spaces in fields and workareas are ignored). This function works in a similar way to the [ ] notation, which you can use to return a single character from a string. Note that you can also use right as a statement, to assign a value to part of a string. This feature is described separately, in the following section. |
Category | String handling |
See Also | ChrList, Chrs, Compare, Fill, IsNumber, Left_Function, Left_statement, Len, Match, Maxlen, Mid_Function, Mid_Satement, Remove, Replace, Right_Statement], Search_SearchNext, SetLen, SetMaxLen, SortOrder, SubstituteData |
Example | This example examines the right most characters of the string txt and attempts to determine what sort of word it is. if Right(txt, 3) = "ing" or Right(txt, 2) = "ed" thentype = "VERB"else if Right(txt, 4) = "tion" thentype = "NOUN"elsetype = "UNKNOWN"end if |