User Tools

Site Tools


right_return_right_justified_string_.htm
Navigation:  Language Reference > 13 - Built-in Functions >====== RIGHT (return right justified string) ====== Previous pageReturn to chapter overviewNext page

RIGHT(string [,length])

blk2blue.jpg

RIGHT Right justifies a string.
string A string constant, variable, or expression.
length A numeric constant, variable, or expression for the length of the return string. If omitted, the length is set to the length of the string.

The RIGHT procedure returns a right justified string. Trailing spaces are removed, then the string is right justified and returned with leading spaces.

Return Data Type:     STRING

Examples:

! | | RIGHT('ABC  ') returns '  ABC' | | !
Message = RIGHT(Message)    !Right justify the message
! | | IF FILEDIALOG('Pick file',FileName) | |   CASE UPPER(RIGHT(FileName,4)) | |   OF '.TPS' ; DO TPS_File | |   OF '.DBF' ; DO DBase_File | |   OF '.CSV' ; DO Text_File | |   ELSE | |      MESSAGE('Unknown file type ' & RIGHT(FileName,4)) | |   END | | END | | !
  MESSAGE('Confirm Credit Card Numbers Ends with ' & RIGHT(CardNo,4))

See Also:

LEFT

CENTER

SUB

right_return_right_justified_string_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1