Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

This conversion can be used to convert text from lower case to upper case in an edit table, or any other window control that allows text input.  The edit table control does not have a check box for upper case conversion.

 

The conversion subroutine is below:

 

Code Block
COMPILE SUBROUTINE UPPER_CASE(CHARSTR CONV, CHARSTR ANS, CHARSTR BRANCH, CHARSTR RETURN_DATA)
declare function unassigned, namecap, mixedcase
*
* UPPER_CASE is a custom ICONV/OCONV procedure
* If called with 'NAMECAP', does initial capitalization.
* with no BRANCH converts entire string to uppercase.
*
* It should be placed in square brackets when called: [UPPER_CASE]
*
* 12/03/1997 * Dragos David Pociu
* 02/16/2003 * Ira Krakow - Modified to include branches for NameCap, MixedCase, and  UpperCase conversions
* Local Equates
EQU VALID$ TO 0 ;* Successful
if unassigned(BRANCH) then BRANCH = ''
* Begin Conversion
*
RETURN_DATA = ""
IF ANS NE "" THEN
  text = ANS
  ANS = ""
  STATUS() = VALID$
  begin case
     case branch = ''  
       convert @LOWER_CASE to @UPPER_CASE in text
     case branch = 'NAMECAP'
       text = namecap(text)
     case branch = 'MIXEDCASE'
       text = mixedcase(text)
  end case
  return_data = text
END
return 0