Traveller, there is no path. You make the path as you walk. Traveller, there is no path. Your tracks are the path, and when you look behind, you will see the road that never again you will traverse. Traveller, there is no path, just the wake that is left in the sea. Antonio Machado
Including comments in βπ π scripts.
Both single line comments (line starting with β#"), or multi-lineβ comments (#*
.... #) are available.
read;
#*
The nom code below uses the [:punct:] character class,
which hopefully, when translated to a nice modern
Unicode sort of language (java, dart, go etc) will recognise
punctuation is all different exotic scripts
*#
[:punct:] { clear; add "Too much punctuation."; print; quit;}
clear;
Multi-line comments start with β#*β and end with β*#β, but they cannot be nested.
Multi-line comments are useful for disabling blocks of code during script development, as well as for long comments at the beginning of a script.
Using multi-line comments to disable blocks of code is very
much as βlast resortβ type of debugging technique. Better debugging techniques
are to use the parse-stack watch lines just after the parse>
label or use the state
command which shows the state of the pep
machine at the time that the state command is issued.
See the document /doc/howto/nom.debug.html for more (and better) debugging techniques.
These are the classic BASH PERL unixy comments where the all text after the hash # character is ignored until the end of the line (i.e \\n). There is not much more to say about them. The translation scripts actually translate βπ π comments into the target language, but this is not terribly useful.
There are certain places in a nom script where comments cannot appear, for example between tests in a list of tests before a block. This may change in the future
read;
[:space:],
# or punctuation. No, error, comments cannot go here.
[:punct:] {
nop; # do nothing. This comment is ok.
}