Ignore:
Timestamp:
Dec 29, 2008, 11:20:11 PM (17 years ago)
Author:
bird
Message:

kmk: Implemented $(for ) and $(while ) loops (C-style). Fixes #73.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kBuild/doc/QuickReference-kmk.txt

    r2155 r2161  
    555555        $(value var)
    556556
    557     Evaluate ``text`` with ``var`` bound to each word in ``words``, and
     557    Evaluate ``body`` with ``var`` bound to each word in ``words``, and
    558558    concatenate the results (spaced)::
    559559
    560         $(foreach var,words,text)
     560        $(foreach var,words,body)
     561
     562    C-style for-loop. Start by evaluating ``init``. Each iteration will
     563    first check whether the ``condition`` (``kmk``-expression) is true,
     564    then expand ``body`` concatenating the result to the previous iterations
     565    (spaced), and finally evaluate ``next``::
     566
     567        $(for init,conditions,next,body)
     568
     569    C-style while-loop. Each iteration will check whether the ``condition``
     570    (``kmk``-expression) is true, then expand ``body`` concatenating the
     571    result to the previous iterations::
     572
     573        $(while conditions,body)
    561574
    562575    Evaluate the variable ``var`` replacing any references to ``$(1)``,
Note: See TracChangeset for help on using the changeset viewer.