Using a text editor to edit rules
You can define or edit a cube rule using any text editor (Notepad, etc.). However, text files limit the information that can be imported. In a text file, rules and accelerators are displayed in this way:
- >>% is used to concatenate rules, accelerators and descriptions on multiple lines.
- Rules are closed by a semicolon (;). e.g. [’3’]=[’2’]+3;
- Accelerators start with an ampersand (&) and are closed by a semicolon. e.g. &[’2’]>[’3’];
- Disabled rules/accelerators start with a hash (#). e.g. #[’2’]=[’1’]+3; or #&[’1’]>[’2’];
- Rules/accelerator descriptions start with #. e.g. [’2’]=[’1’]+3 #rule description, or #&description.
When you import from a text file:
- Multiple lines are joined as one string
- Strings starting with # are imported as descriptions (even if they are disabled rules/accelerators)
- Strings starting ’&’ and ending ’;’ are imported as accelerators
- Strings starting with anything other than ’#’ or ’&’ and ending with ’;’ are imported as rules.
Related topics