[Mumps2Py:] [100] test file for the $translate_f.mps()

[ Thread Index | Date Index | More lists.mumps2py.org/discuss Archives ]


Revision: 100
Author:   pgallot
Date:     2008-02-12 19:14:25 +0000 (Tue, 12 Feb 2008)

Log Message:
-----------
test file for the $translate_f.mps()

Added Paths:
-----------
    trunk/testfiles/translate_f.mps


Added: trunk/testfiles/translate_f.mps
===================================================================
--- trunk/testfiles/translate_f.mps	                        (rev 0)
+++ trunk/testfiles/translate_f.mps	2008-02-12 19:14:25 UTC (rev 100)
@@ -0,0 +1,14 @@
+ SET b="BACKUP"
+ W !,$TR(b) ;			"BACKUP"
+ W !,$TR(b,"AEIOU") ;		"BCKP"
+ SET UP="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ SET LO="abcdefghijklmnopqrstuvwxyz"
+ SET X="ABCdef"
+ W !,$TRANSLATE(X,LO,UP) ;  	"ABCDEF"
+ W !,$TRANSLATE(X,UP,LO) ;  	"abcdef"
+ W !,$TRANSLATE(X,LO) ;	  	"ABC"
+ W !,$TRANSLATE(X,UP) ;		"def"
+ SET dt="02/14/08"
+ W !,$TRANSLATE("Yy/Mm/Dd","Mm/Dd/Yy",dt) ;	"08/02/14"
+ SET dt2="02/14/2008"
+ W !,$TR("Yy-Mm-Dd","Mm:Dd:CcYy",dt2),! ;	"08-02-14"


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/