Converts any uppercase characters in a CHARACTER or LONGCHAR expression to lowercase characters, and returns the result.
LC ( expression )A constant, field name, variable name, or expression that results in a CHARACTER or LONGCHAR value.This procedure finds a Customer record. After the user updates the SalesRep field, the procedure converts the first character of the SalesRep value to uppercase and the remaining characters to lowercase.
REPEAT:PROMPT-FOR Customer.CustNum.FIND Customer USING Customer.CustNum.DISPLAY Customer.Name.UPDATE Customer.SalesRep.Customer.SalesRep = CAPS(SUBSTRING(Customer.SalesRep, 1, 1) ) +LC(SUBSTRING(Customer.SalesRep, 2) ).DISPLAY Customer.SalesRep.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 SalesRep 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.
![]()
The LC function returns lowercase characters relative to the settings of the Internal Code Page (-cpinternal) and Case Table (-cpcase) startup parameters. For more information on these parameters, see Startup Command and Parameter Reference.
![]()
The LC function is double-byte enabled. The specified expression can yield a string containing double-byte characters; however, the LC function changes only single-byte characters in the string.
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates. |