Previous Next

LC function
Converts any uppercase characters in a CHARACTER or LONGCHAR expression to lowercase characters, and returns the result.
Syntax 
 
LC ( expression )
expression
A constant, field name, variable name, or expression that results in a CHARACTER or LONGCHAR value.
Example 
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.
Notes 
*
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 OpenEdge Deployment: Startup Command and Parameter Reference.
*
See also 
CAPS function

Previous Next
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates.