2013-04-08 00:56 UTC+0200 Viktor Szakats (harbour syenar.net)
* tests/inifiles.prg
! fix to prev
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user