templeos-info/public/Wb/Doc/Define.DD.HTML

48 lines
3.1 KiB
Plaintext
Raw Normal View History

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="generator" content="TempleOS V5.03">
<meta name="viewport" content="width=device-width">
<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=cF0>TempleOS has a string indirection feature implemented with the same hash symbol
2024-03-23 13:40:50 +00:00
<a name="l2"></a>table entry as </span><span class=cF2>#define</span><span class=cF0> macros, </span><a href="/Wb/Kernel/KernelA.HH#l688"><span class=cF4>HTT_DEFINE_STR</span></a><span class=cF0>. Support for string lists is also
<a name="l3"></a>provided, but it's not very efficient, though, you can make a hash table with a
2024-03-23 13:40:50 +00:00
<a name="l4"></a>list using </span><a href="/Wb/Kernel/KHashB.HC#l206"><span class=cF4>HashDefineLstAdd</span></a><span class=cF0>(). See </span><a href="/Wb/Adam/DolDoc/DocInit.HC#l23"><span class=cF4>::/Adam/DolDoc/DocInit.HC</span></a><span class=cF0>.
<a name="l5"></a>
<a name="l6"></a>If you have an </span><span class=cF2>@</span><span class=cF0> as the first char of a define list entry, it is an alias for
<a name="l7"></a>the prev entry num.
<a name="l8"></a>
<a name="l9"></a>Each task can load its own Define strings. Remember, when a </span><span class=cF4><u>Hash</u></span><span class=cF0> table is
<a name="l10"></a>searched for a string, if it is not found, the parent task's table is searched.
<a name="l11"></a>
2024-03-23 13:40:50 +00:00
<a name="l12"></a>The </span><a href="/Wb/Doc/DolDocOverview.DD.HTML#l1"><span class=cF4>DolDoc</span></a><span class=cF0> framework supports text that changes based on entries in the task's
<a name="l13"></a>symbol table. Set a text entry with a </span><span class=cF2>D=</span><span class=cF0> arg, as in </span><span class=cF2>$TX,&quot;&quot;,D=&quot;DD_MYSTRING&quot;$</span><span class=cF0>.
2024-03-23 13:40:50 +00:00
<a name="l14"></a>See </span><a href="/Wb/Demo/DolDoc/DefineStr.HC#l1"><span class=cF4>::/Demo/DolDoc/DefineStr.HC</span></a><span class=cF0>, </span><a href="/Wb/Adam/ADefine.HC#l1"><span class=cF4>::/Adam/ADefine.HC</span></a><span class=cF0> and </span><a href="/Wb/Doc/MemOverview.DD.HTML#l1"><span class=cF4>::/Doc/MemOverview.DD</span></a><span class=cF0>.
<a name="l15"></a>
2024-03-23 13:40:50 +00:00
<a name="l16"></a>See </span><a href="/Wb/Demo/Define.HC#l1"><span class=cF4>::/Demo/Define.HC</span></a><span class=cF0>.
</span></pre></body>
</html>