Difference between revisions of "Prokee Module: settings"

From prokee
Jump to navigation Jump to search
Line 13: Line 13:
 
  ($|-)[>]''name''[ [...]]=[ [...]]("''value''"[''comment'']|''value''[;[''comment'']])
 
  ($|-)[>]''name''[ [...]]=[ [...]]("''value''"[''comment'']|''value''[;[''comment'']])
  
  [''comment'']
+
  ''comment''
  
 
=== Examples ===
 
=== Examples ===

Revision as of 23:27, 6 May 2019

The module settings provides methods to read and write ini-files.

Syntax of ini-Files

The ini-files are parsed line by line.

line[\n...]

Each line may contain one of the following contents:

DEF title[:[comment]]
\[title\][comment]
END|}
($|-)[>]name[ [...]]=[ [...]]("value"[comment]|value[;[comment]])
comment

Examples

Example 1:

DEF window:SETTINGS
{
    $show_window="maximize";
}
DEF files:SETTINGS
{
    $file="info.txt";
    $file="test.txt";
    $file="main.txt";
}

Example 2:

DEF window
    $show_window="maximize";
END

DEF files
    $file="info.txt";
    $file="test.txt";
    $file="main.txt";
END

Example 3:

[window]
->show_window="maximize";

[files]
->file="info.txt";
->file="test.txt";
->file="main.txt";

Interfaces

AbsSettings

AbsMultiSettings

Implementations