contentsconceptssyntaxlibrariessampleserrorsindex
Full text search
For loops, implementing  
 

Introduction

OmniMark does not have a built-in for loop construction, but it is simple to implement one using a macro. To be consistent with other OmniMark looping constructs, the macro is named "repeat for".

You can use the "repeat for" macro to write code like the following that generates an "\emptycolumn" output for each column in a table between "current-column" and "total-columns".

  repeat for column-number
             from current-column + 1
             to total-columns
     doing
       output "\emptycolumn{%d(column-number)}"
  again



Sample

  macro repeat for token counter-name
        from arg min-value to arg max-value
        doing arg actions again
     is
        do
           local counter counter-name

           set counter-name to min-value
           repeat
              exit when counter-name > (max-value)
              actions
              increment counter-name
              again
           again
        done
  macro-end

   
----  

Top [CONTENTS] [CONCEPTS] [SYNTAX] [LIBRARIES] [SAMPLES] [ERRORS] [INDEX]

Generated: April 21, 1999 at 2:01:42 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © OmniMark Technologies Corporation, 1988-1999.