Closed ghost closed 2 years ago
A single dollar sign, in DolDoc syntax, is an escape character, recognized as the beginning of a DolDoc tag. An example is $GREEN$
, which is a DolDoc tag that sets the current foreground text color to green. If you type a dollar sign in a document, type another one to make it a double-dollar-sign, which DolDoc recognizes and prints as a standard character, instead of as DolDoc syntax. DolDoc tags won't be visible when viewing a document because they affect how the document is drawn, they aren't drawn characters. To see the tags in a document, press Ctrl-T
.
https://zeal-operating-system.github.io/ZealOS/Doc/DolDocOverview.DD.html
https://zeal-operating-system.github.io/ZealOS/Doc/CosmiC.DD.html#l240
If importing files that contain dollar signs, you can try opening them with the Plain
function first, to view them as plain-text.
Oh, I get it. Thanks for the answer!
Can I ask another question? How do you use escape codes in TempleOS? Print("\x1b[2J"); doesn't seem to work..
ANSI escape codes are not supported.
Then is there a command like clear?
Yes, $CL$
is a DolDoc tag that will clear the entire document, and the functions Cls
and DocClear
can be used to clear the window programmatically as well.
As a note, you don't have to use Print()
to print strings. Using raw quotes as a statement, such as "Test:\n";
will print to the document. Also, there is a function ToDolDoc
which can be used to duplicate dollar signs in a document to make it functional as DolDoc.
If there is a single dollar sign in a file, Ed() seems to just cut the file. I don't knowif this is expected behavior.
If I put two dollar signs, then the machine shows it as one dollar sign.