Progress
Language Reference


LC Function

Interfaces
OS
SpeedScript
All
All
Yes

Returns a character string identical to a specified string, but all uppercase letters in the string are converted to lowercase.

SYNTAX

LC ( string ) 

string

A character expression that contains uppercase letters you want to convert to lowercase.

EXAMPLE

This procedure finds a customer record. After the user updates the sales-rep field, the procedure converts the first character of the sales-rep value to uppercase and the remaining characters to lowercase.

r-lc.p
REPEAT:
    PROMPT-FOR Customer.Cust-num.
    FIND Customer USING Cust-num.
    DISPLAY Name.
    UPDATE sales-rep.
    sales-rep = CAPS(SUBSTRING(sales-rep, 1, 1) ) +
                LC(SUBSTRING(Sales-rep, 2) ).
    DISPLAY Sales-rep.
END. 

The CAPS function uses the SUBSTRING function to extract the first character of the field, which it then converts to uppercase.

In the LC function, the result of the SUBSTRING function is the remaining characters in the sales-rep field, starting with character position 2. (No length is specified, so the remainder of the string is assumed). The LC function converts these characters to lowercase.

NOTES

SEE ALSO

CAPS Function


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095