see changelog

This commit is contained in:
Eddie Runia
1999-06-13 07:39:11 +00:00
parent 90afad3419
commit 17007dabc4
2 changed files with 20 additions and 0 deletions

View File

@@ -1,3 +1,7 @@
19990612 08:30 CET Matthew Hamilton
* tests/working/inifiles.prg
with ReadBool and WriteBool
19990612 10:57 PST Ron Pinkas
* source/compiler/harbour.y
Added check on non used variables to be done at the end of source file so last function will be tested too.

View File

@@ -15,6 +15,8 @@ function Main(cFilename, cSection)
aeval(s, {|x| qout(x)})
oIni:WriteDate('Date Test', 'Today', Date() )
oIni:WriteBool('Bool Test', 'True', .t.)
qout( oIni:ReadBool('Bool Test', 'True', .f.) )
oIni:UpdateFile()
return nil
@@ -35,6 +37,8 @@ function TIniFile()
oClass:AddMethod( "WriteNumber", @WriteNumber() )
oClass:AddMethod( "ReadDate", @ReadDate() )
oClass:AddMethod( "WriteDate", @WriteDate() )
oClass:AddMethod( "ReadBool", @ReadBool() )
oClass:AddMethod( "WriteBool", @WriteBool() )
oClass:AddMethod( "ReadSection", @ReadSection() )
oClass:AddMethod( "ReadSections", @ReadSections() )
oClass:AddMethod( "DeleteKey", @DeleteKey() )
@@ -184,6 +188,18 @@ static procedure WriteDate(cSection, cIdent, dDate)
::WriteString( cSection, cIdent, DToS(dDate) )
return
static function ReadBool(cSection, cIdent, lDefault)
local Self := QSelf()
local cDefault := Iif( lDefault, '.t.', '.f.' )
return ::ReadString(cSection, cIdent, cDefault) == '.t.'
static procedure WriteBool(cSection, cIdent, lBool)
local Self := QSelf()
::WriteString( cSection, cIdent, Iif(lBool, '.t.', '.f.') )
return
static procedure DeleteKey(cSection, cIdent)
local Self := QSelf()
local j, i := AScan( ::Contents, {|x| x[1] == cSection} )