Programmer Guide/Macro Library/SECTIONFILE: Difference between revisions
(initial import) |
m (Text replace - "S_TOOLS-STx" to "{{STX}}") |
||
(One intermediate revision by one other user not shown) | |||
Line 4: | Line 4: | ||
==SECTIONFILE== | ==SECTIONFILE== | ||
A section file is a file which is formatted like the (old) windows ini-files. It may contain one or more sections. Each sections starts with a header "[sectiontype {sectionname}]" and contains a list of text lines. In earlier | A section file is a file which is formatted like the (old) windows ini-files. It may contain one or more sections. Each sections starts with a header "[sectiontype {sectionname}]" and contains a list of text lines. In earlier {{STX}} versions (< 3.0) this format was used for data management (metadata, sources, ...). | ||
=====Usage:===== | =====Usage:===== |
Latest revision as of 16:57, 5 April 2011
Contents
SECTIONFILE
A section file is a file which is formatted like the (old) windows ini-files. It may contain one or more sections. Each sections starts with a header "[sectiontype {sectionname}]" and contains a list of text lines. In earlier STx versions (< 3.0) this format was used for data management (metadata, sources, ...).
Usage:
SECTIONFILE file ; cmd table [ cmdArgs ]
Parameters:
- file
- The name of the section file.
- cmd
- One of the following commands:
LIST
LOAD
SAVE
- table
- The id of the target table for section list or * for new table.
- cmdArgs
- See the specific command for details.
Result:
See the specific command for details.
LIST
Stores all matching sections in the table. For each section an entry containing 'type name {rest-of-header-line}' is created.
Usage:
SECTIONFILE file ; LIST table [ type name ]
Parameters:
- type, name
- The type and name of sections to be listed. These arguments are optional.
Result:
The table containing section headers or empty string for error.
LOAD
Loads the data of the specified section. For each data line one table entry is created. The header is not included in the table.
Usage:
SECTIONFILE file ; LOAD table type [ name ]
Parameters:
- type
- The type of section file to be loaded.
- name
- The name of the section to be loaded. This is optional.
Result:
The id of the table containing section data or empty string for error.
SAVE
Stores the data in the specified section. If no or an empty table is specified the section is deleted.
Usage:
SECTIONFILE file ; SAVE table type [ name ]
Parameters:
- type
- The type of section file to be loaded.
- name
- The name of the section to be loaded. This is optional.
Result:
The id of the table containing section data or empty string for error.
Array