Friday 27 May 2016

Translate

Translate

  • Statement converts the case or single characters of the character-type data object text. The statement CASE can be used for the conversion to upper/lower case; USING can be used for the conversion according to a mask. The variable text must be character-type. 
  • Syntax :
TRANSLATE text {TO {UPPER|LOWER} CASE}
             | {USING mask}.


Ex : 
  1. ... USING  mask.

Source Code :


PARAMETERS txt TYPE string.


TRANSLATE txt USING 'AB' .


WRITE txt.




Input



Output


  • This is works similar to replace all occurrences of .
--------------------------------------------------------------------------------------
Ex 2.

  • TO LOWER CASE or  TO UPPER CASE.


Source Code


PARAMETERS txt TYPE string.


TRANSLATE txt TO LOWER CASE.


WRITE txt.



Input




Output





                               For more information.......


No comments:

Post a Comment