Programmer Guide/Macro Library/SECTIONFILE: Difference between revisions
(initial import) |
m (1 revision: Initial import) |
(No difference)
|
Revision as of 17:31, 18 November 2010
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 S_TOOLS-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