Changeset 2161 for trunk/kBuild/doc/QuickReference-kmk.html
- Timestamp:
- Dec 29, 2008, 11:20:11 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/doc/QuickReference-kmk.html
r2155 r2161 913 913 $(value var) 914 914 </pre> 915 <p>Evaluate <tt class="docutils literal"><span class="pre"> text</span></tt> with <tt class="docutils literal"><span class="pre">var</span></tt> bound to each word in <tt class="docutils literal"><span class="pre">words</span></tt>, and915 <p>Evaluate <tt class="docutils literal"><span class="pre">body</span></tt> with <tt class="docutils literal"><span class="pre">var</span></tt> bound to each word in <tt class="docutils literal"><span class="pre">words</span></tt>, and 916 916 concatenate the results (spaced):</p> 917 917 <pre class="literal-block"> 918 $(foreach var,words,text) 918 $(foreach var,words,body) 919 </pre> 920 <p>C-style for-loop. Start by evaluating <tt class="docutils literal"><span class="pre">init</span></tt>. Each iteration will 921 first check whether the <tt class="docutils literal"><span class="pre">condition</span></tt> (<tt class="docutils literal"><span class="pre">kmk</span></tt>-expression) is true, 922 then expand <tt class="docutils literal"><span class="pre">body</span></tt> concatenating the result to the previous iterations 923 (spaced), and finally evaluate <tt class="docutils literal"><span class="pre">next</span></tt>:</p> 924 <pre class="literal-block"> 925 $(for init,conditions,next,body) 926 </pre> 927 <p>C-style while-loop. Each iteration will check whether the <tt class="docutils literal"><span class="pre">condition</span></tt> 928 (<tt class="docutils literal"><span class="pre">kmk</span></tt>-expression) is true, then expand <tt class="docutils literal"><span class="pre">body</span></tt> concatenating the 929 result to the previous iterations:</p> 930 <pre class="literal-block"> 931 $(while conditions,body) 919 932 </pre> 920 933 <p>Evaluate the variable <tt class="docutils literal"><span class="pre">var</span></tt> replacing any references to <tt class="docutils literal"><span class="pre">$(1)</span></tt>,
Note:
See TracChangeset
for help on using the changeset viewer.