Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r23 - trunk

genelib
Discussion topic

Back to topic list

svn commit: r23 - trunk

Author lotec
Full name Jan Bogaerts
Date 2006-02-28 05:55:15 PST
Message Author: lotec
Date: Tue Feb 28 05:55:14 2006
New Revision: 23

Modified:
   trunk/Application.gen
   trunk/convert.gen
Log:
-made application global
-convert: added convertion for bool

Modified: trunk/Application.gen
Url: http://genelib.tigri​s.org/source/browse/​genelib/trunk/Applic​ation.gen?view=diff​&rev=23&p1=tr​unk/Application.gen​&r1=22&p2=tru​nk/Application.gen​&r2=23
====================​====================​====================​==================
--- trunk/Application.gen (original)
+++ trunk/Application.gen Tue Feb 28 05:55:14 2006
@@ -20,6 +20,7 @@
 
 include windowscommon, string, wKernel32, wUser32, system, Extract, patterns, wUser32, widgets, actions, messagebox;
 //------------------​--------------------​--------------------​--------------------​---------------
+global //make certain that everything from here on is global
 
 singletonspace Application =
  var CmdLine: string

Modified: trunk/convert.gen
Url: http://genelib.tigri​s.org/source/browse/​genelib/trunk/conver​t.gen?view=diff&​rev=23&p1=trunk/​convert.gen&r1=2​2&p2=trunk/conve​rt.gen&r2=23
====================​====================​====================​==================
--- trunk/convert.gen (original)
+++ trunk/convert.gen Tue Feb 28 05:55:14 2006
@@ -32,6 +32,8 @@
      HtoD(aVal: string&): dword static
      BtoD(aVal: string&): dword static
      OtoD(aVal: string&): dword static
+ btos(aVal: bool): string static
+ StoB(aVal: string&): bool static
      UTFtoS(aVal: pointer, aSize: dword): sWideString static //converts an UTF-16 or UTF-8 encoded data block to a wide string
      UTF8toS(aVal: pointer, aSize: dword): sWideString static //converts an UTF-8 encoded data block to a wide string
      UTFNrBytes(aVal: byte&): word static inline //extracts the number of bytes to read + sets the first value
@@ -507,4 +509,23 @@
       iPos += 1
    }
    return(iRes)
+;
+
+exp Convert.btos(aVal: bool): string
+=
+ iRes: string
+ [<-aVal == true-> iRes = 'true'
+ <--> iRes = 'false'
+ ]
+ return(iREs)
+;
+
+exp Convert.StoB(aVal: string&): bool
+=
+ iTemp: string
+ iTemp = aval.Tolower
+ [<-iTemp == 'true'-> return(true)
+ <-iTemp == 'false'-> return(false)
+ <--> raise(sConvertException('string is not a boolean'))
+ ]
 ;
\ No newline at end of file

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r23 - trunk lotec Jan Bogaerts 2006-02-28 05:55:15 PST
Messages per page: