templeos-info/public/Wb/Home/Doc/CmdLineOverview.DD.HTML

81 lines
5.4 KiB
Plaintext
Raw Normal View History

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="generator" content="TempleOS V5.03">
<link rel="stylesheet" href="/style/templeos.css">
<script src="/script/templeos.js"></script>
<style type="text/css">
.cF0{color:#000000;background-color:#ffffff;}
.cF1{color:#0000aa;background-color:#ffffff;}
.cF2{color:#00aa00;background-color:#ffffff;}
.cF3{color:#00aaaa;background-color:#ffffff;}
.cF4{color:#aa0000;background-color:#ffffff;}
.cF5{color:#aa00aa;background-color:#ffffff;}
.cF6{color:#aa5500;background-color:#ffffff;}
.cF7{color:#aaaaaa;background-color:#ffffff;}
.cF8{color:#555555;background-color:#ffffff;}
.cF9{color:#5555ff;background-color:#ffffff;}
.cFA{color:#55ff55;background-color:#ffffff;}
.cFB{color:#55ffff;background-color:#ffffff;}
.cFC{color:#ff5555;background-color:#ffffff;}
.cFD{color:#ff55ff;background-color:#ffffff;}
.cFE{color:#ffff55;background-color:#ffffff;}
.cFF{color:#ffffff;background-color:#ffffff;}
</style>
</head>
<body>
2024-03-23 13:40:50 +00:00
<pre style="font-family: courier, monospace; font-size: 10pt;">
<a name="l1"></a><span class=cF5> Command Line Overview</span><span class=cF0>
<a name="l2"></a>
2024-03-23 13:40:50 +00:00
<a name="l3"></a>The cmd line feeds into the </span><a href="/Wb/Doc/HolyC.DD.HTML#l1"><span class=cF4>HolyC</span></a><span class=cF0> compiler line-by-line as you type. A stmt
<a name="l4"></a>outside a function executes immediately. Remember to add a semicolon.
<a name="l5"></a>
<a name="l6"></a>Look-up the function headers with </span><span class=cF2>AutoComplete</span><span class=cF0> by hitting </span><span class=cF2>&lt;CTRL-SHIFT-F1&gt;</span><span class=cF0> after
<a name="l7"></a>typing the first few letters.
<a name="l8"></a></span><span class=cF4>
2024-03-23 13:40:50 +00:00
<a name="l9"></a></span><a href="/Wb/Kernel/BlkDev/DskDirB.HC#l102"><span class=cF4>Click Here</span></a><span class=cF0> to see the directory cmd header. It accepts default args from C++.
<a name="l10"></a>
<a name="l11"></a>&gt;</span><span class=cF2>Dir(&quot;*.DD.Z&quot;);</span><span class=cF0>
<a name="l12"></a>
<a name="l13"></a>If you don't have args, you don't need parenthesis.
<a name="l14"></a>
<a name="l15"></a>&gt;</span><span class=cF2>Dir;</span><span class=cF0>
<a name="l16"></a>
<a name="l17"></a>Directories are referenced with </span><span class=cF2>/</span><span class=cF0> not </span><span class=cF2>\</span><span class=cF0>. There is a current directory, but not
<a name="l18"></a>a path. To run a program, you typically </span><span class=cF2>#include </span><span class=cF0>it. There are several
<a name="l19"></a>shortcuts for </span><span class=cF2>#include</span><span class=cF0>ing files. Right-click or hit </span><span class=cF2>&lt;ENTER&gt;</span><span class=cF0> on a directory
<a name="l20"></a>listing or press </span><span class=cF2>&lt;F5&gt;</span><span class=cF0> while editing.
<a name="l21"></a>
2024-03-23 13:40:50 +00:00
<a name="l22"></a>&gt;</span><span class=cF2>Ed(&quot;NewFile.HC.Z&quot;);</span><span class=cF0> Invokes the editor. See </span><a href="/Wb/Adam/DolDoc/DocLink.HC#l29"><span class=cF4>Doc Link Type</span></a><span class=cF0>.
<a name="l23"></a>
<a name="l24"></a>Most filenames end in </span><span class=cF2>.Z</span><span class=cF0> because they are stored compressed.
<a name="l25"></a>
<a name="l26"></a>Drives are specified with a letter. The boot drive is specified with a '</span><span class=cF2>:</span><span class=cF0>'.
<a name="l27"></a>The home dir drive is specified with a </span><span class=cF2>'~'</span><span class=cF0>.
<a name="l28"></a>
<a name="l29"></a>&gt;</span><span class=cF2>Drv('B');</span><span class=cF0> B drive
<a name="l30"></a>
2024-03-23 13:40:50 +00:00
<a name="l31"></a>The drive can be specified in a </span><a href="/Wb/Kernel/BlkDev/DskDirB.HC#l9"><span class=cF4>Cd</span></a><span class=cF0>() command as in:
<a name="l32"></a>
<a name="l33"></a>&gt;</span><span class=cF2>Cd(&quot;B:/Tmp&quot;);</span><span class=cF0> B drive
<a name="l34"></a>&gt;</span><span class=cF2>Cd(&quot;::/Demo&quot;);</span><span class=cF0> Boot drive
<a name="l35"></a>
<a name="l36"></a>The home directory is specified with a </span><span class=cF2>'~'</span><span class=cF0>.
<a name="l37"></a>
2024-03-23 13:40:50 +00:00
<a name="l38"></a>&gt;</span><span class=cF2>Cd(&quot;~/Psalmody&quot;);</span><span class=cF0> See </span><a href="/Wb/Doc/GuideLines.DD.HTML#l37"><span class=cF4>::/Home dir</span></a><span class=cF0>.
<a name="l39"></a>
<a name="l40"></a>If a file is not found, </span><span class=cF2>.Z</span><span class=cF0> is added or removed and a search is done, again. If
<a name="l41"></a>a file is still not found, all parent directories are searched.
<a name="l42"></a>
2024-03-23 13:40:50 +00:00
<a name="l43"></a>You can place macros in your </span><a href="/Wb/Home/PersonalMenu.#l1"><span class=cF4>PersonalMenu</span></a><span class=cF0> for </span><a href="/Wb/Kernel/BlkDev/DskDirB.HC#l9"><span class=cF4>Cd</span></a><span class=cF0>() commands. </span><span class=cF2>&lt;CTRL-m&gt;</span><span class=cF0> to access
<a name="l44"></a>your menu.
<a name="l45"></a>
2024-03-23 13:40:50 +00:00
<a name="l46"></a>&gt;</span><span class=cF2>Find(&quot;needle&quot;,&quot;/Demo/*.HC.Z;*.DD.Z;&quot;);</span><span class=cF0> See </span><a href="/Wb/Doc/FileUtils.DD.HTML#l1"><span class=cF4>File Utils</span></a><span class=cF0>.
<a name="l47"></a></span><span class=cF4>
<a name="l48"></a><u>Cmd Line Routines</span><span class=cF0>
<a name="l49"></a></span><span class=cF9>
<a name="l50"></a>Take Tour</u></span><span class=cF0>
</span></pre></body>
</html>