UPLOW: converts upper-case names to upper and lower case
Description
Program subroutine that converts names in upper case to upper
and lower case.
Categories
Conversion
Program Development
Related files
User Instructions
Program subroutine; cannot be run interactively. (For test
purposes see TESTUPLW, a demonstration program.)
Programmer Instructions
When converting from upper case to upper and lower case,
capitalizes the first letter in each word or name; may also
capitalize other letters depending on the name (e.g.
'MACBRIEN' becomes 'MacBrien').
Accepts three arguments, returning the translated text in the
same field:
Length BINARY The length of the string to be
converted.
Type PIC X(01) Either 'U' ("convert to upper case")
or 'L' ("convert to upper/lower
case").
Data (variable) The data to be converted. UPLOW
returns the converted data in the
same field.
Assembler source is available.
Example of use
Often the name stored in applications consists of upper case
letters only. Use UPLOW to convert the names to upper and
lower case.
Note that repeated use of the conversion to lower case will
result in different values for the name. Here are a few
examples:
Original format First pass Second pass
--------------- ---------- -----------
THIS IS A TEST This Is A Test This Is A Test
MACBRIEN MacBrien Macbrien
MCARTHUR McArthur Mcarthur
Comments
The Assembler source file mentions some of the name
conditions that have not been tested, include names beginning
with 'LA' (e.g. 'LaVista') as possible areas for future
improvement. Conversion to uppercase also helpful.