Omni Systems, Inc.

  

Mif2Go User's Guide, Version 55

  

Valid HTML 4.01!

 

Made with Mif2Go

28 Working with macros > 28.4 Using multiple-value list variables > 28.4.1 Understanding list-variable syntax


28.4.1 Understanding list-variable syntax

To create a list variable, all you have to do is use a Mif2Go macro variable name with an index value in brackets, similar to C-language array notation:

$$listname[index]

For example:

$$mylist[$$_count]          a variable as the index

$$mylist[2]                 a constant as the index

$$mylist[($$myindex + 1)]   an expression as the index

List indexes can be nested

The index is a string, not just a number, so it can be anything, even another nested list reference:

<$$mylist[$$another[one]]>

You can access the number of items in the list with <$$mylist[]>.



28 Working with macros > 28.4 Using multiple-value list variables > 28.4.1 Understanding list-variable syntax