2013-04-08 00:56 UTC+0200 Viktor Szakats (harbour syenar.net)

* tests/inifiles.prg
    ! fix to prev
This commit is contained in:
Viktor Szakats
2013-04-08 00:57:02 +02:00
parent cfb1dfd8fa
commit b8a63e3ab7
2 changed files with 33 additions and 0 deletions

View File

@@ -10,6 +10,10 @@
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
*/
2013-04-08 00:56 UTC+0200 Viktor Szakats (harbour syenar.net)
* tests/inifiles.prg
! fix to prev
2013-04-08 00:52 UTC+0200 Viktor Szakats (harbour syenar.net)
* bin/check.hb
+ will now check for missing copyright/license message

View File

@@ -48,6 +48,35 @@
#include "fileio.ch"
#include "hbclass.ch"
PROCEDURE Main( cFilename, cSection )
LOCAL oIni
LOCAL s, n
hb_default( @cFilename, "harbour.ini" )
hb_default( @cSection, "1" )
oIni := TIniFile():New( cFileName )
n := Val( cSection )
?
? "Sections:"
s := oIni:ReadSections()
AEval( s, {| x | QOut( "[" + x + "]" ) } )
?
? "[" + s[ n ] + "]"
s := oIni:ReadSection( s[ n ] )
AEval( s, {| x | QOut( x ) } )
oIni:WriteDate( "Date Test", "Today", Date() )
oIni:WriteBool( "Bool Test", "True", .T. )
? oIni:ReadBool( "Bool Test", "True", .F. )
oIni:UpdateFile()
RETURN
CREATE CLASS TIniFile
VAR FileName