ModeFile - Functions section

Inspecting the Functions section of, for example, the BaseMode ModeFile, it wil be noticed that there are many blank lines in this section, so the individual blocks are not initially obvious!

These blank lines are necessary to avoid ambiguity*. Since the lines in a block can be in any order so we could have:

Icon SpriteName
Help HelpToken
Select SomeFunction
Key KeyName
Adjust AnotherFunction

In the above it is unclear if the Key definition belongs to Select or to Adjust. To avoid this each Select/Adjust line must be separated from other Select/Adjust lines using a blank line. If the Key line belongs to Select we need:

Icon SpriteName
Help HelpToken
Select SomeFunction
   
Key KeyName
Adjust AnotherFunction

However, when the Key line belongs to Adjust, then this is required:

Icon SpriteName
Help HelpToken
Select SomeFunction
Key KeyName
   
Adjust AnotherFunction

Was this page helpful? Please email me and/or rate this page:


If you want a reply make sure any email address @torrens.org will not get spam-binned!
Optional comment

Other relevant pages

Top of page


Page Information

http://css.torrens.org/valid-html401-bluehttp://css.torrens.org/valid-css Document URI: http://stronged.torrens.org/man/modes/examples/functs.html
Page first published Tuesday the 14th of August, 2018
Last modified:Mon, 08 Jul 2024 09:18:34 BST
© 2018 - 2024 Richard John Torrens.