Difference between revisions of "Settings File Format"
(New page: This documentation is available in Settings/Settings_Default.conf. The format for settings files is basic. An example will suffice for most purposes. == Basic Format == <setti...)
Latest revision as of 22:25, 25 July 2007
This documentation is available in Settings/Settings_Default.conf.
The format for settings files is basic. An example will suffice for most purposes.
<setting1 group name>; <setting1 name>; <setting1 value>; <setting2 group name>; <setting2 name>; <setting2 value>;
%-------------------------------------example start % blah blah blah GENERAL; Main_Code_Directory; /ratter/ExperPort GENERAL; dbl_quotes_ignored; "/ratter/ExperPort" GENERAL;NoSpacingIsFine;0; GENERAL;EmptyValuesAreEmptyStrings; ; FAVORITES; food; tomato soup ; %internal spaces saved DIOLINES ; left1water ; 1 %terminal ; unnecessary EXAMPLE ; QuiteEmpty; ; %this one will have an empty string as its value % commentcomment DIOLINES ; right1water ; 2 FAVORITES; animal; rat % commentcommentcomment % blah %-------------------------------------example end
- Phrases (setting group names, setting names, or setting values) must be separated by ONE SEMI-COLON. Spaces/tabs between the phrases are entirely unrestricted. - WHITESPACE treatment: -- NO linebreak/newline characters are permitted anywhere between the START of a setting's group name and the END its value string. e.g. In the line " * group ^ ; sname; sval *" newline/linebreak chars are okay at e.g. the positions marked by asterisks*, but NOT ALLOWED at e.g. the position marked with a carat. -- LEADING and TRAILING spaces/tabs for all phrases are DISCARDED. e.g. " Group One ; " is interpreted as "Group One". -- Spaces/tabs WITHIN (i.e. not leading or trailing) setting values are PERMITTED and are INCLUDED in the loaded value. -- However, whitespace WITHIN group NAMES and setting NAMES is NOT PERMITED and will interrupt settings loading and return an informative error ID and message. - Matlab-style COMMENTING is respected in the settings file. - SETTING NAME strings and SETTING GROUP NAME strings must be valid as MATLAB variables - i.e. no special characters, must start with a letter, not empty, etc. Also, they cannot match certain SettingsObject reserved words like 'any' or 'all'. (current list in variable reserved_names below). - NUMERIC values are interpreted, stored, and retrieved as such (if they are recognized by str2double). - Line length is not unlimited. Characters after the 4095th character on a line are not read. - Settings (and groups and values) are case-sensitive. - 'ALL' (case-insensitive) is not permitted as a group or setting name. - Double-quotes in setting values are removed.