26.12.2012 Views

ICAM Virtual Machine V19 - Kxcad.net

ICAM Virtual Machine V19 - Kxcad.net

ICAM Virtual Machine V19 - Kxcad.net

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>ICAM</strong> <strong>Virtual</strong> <strong>Machine</strong> ® <strong>Virtual</strong> <strong>Machine</strong> Reference, Model Customization<br />

The Macro Language, Fundamentals of the Macro Language<br />

� An expression with sequence data type consists of an ordered set of data elements. The<br />

data elements within a sequence can be of any type, and do not all have to be the same<br />

data type.<br />

The macro language does not require strong data typing. This means that the same variable can<br />

hold information of different types during the course of processing. This provides a great deal of<br />

flexibility and simplifies coding. For those who prefer a more formal arrangement, the DECLAR<br />

command can be used to strongly type variables.<br />

Macro Variables<br />

There are five types of variables: user variables, predefined global variables, predefined local<br />

variables, $P arguments and macro system variables. The following table describes the format of<br />

the various types of variables:<br />

Variable Type Variable Format Examples<br />

User A...Z~[A...Z 0...9_ ] I,ABC2,M4_J<br />

Predefined Global %Gnn %G2,%G02,%G23<br />

Predefined Local %Lnn %L2,%L02,%L23<br />

$P Argument $Pnn $P2,$P02,$P23<br />

System $name $XC,$PI,$T<br />

User variables must always start with an alphabetic character. The remaining characters can be<br />

any combination of letters, digits and the underscore character. The maximum size of a user<br />

variable is 32 characters.<br />

Global variables retain their value across all macros; local variables only retain their value while<br />

a macro is running and are forgotten once it is finished. Global values can therefore be used (and<br />

in fact are the only way) to pass information from one macro to another, whereas local variables<br />

are used for calculations local to a specific macro. By default, user variables are local unless a<br />

DECLAR command is given in the machine startup macro declaring the variable as global.<br />

For predefined local variables, predefined global variables and $P arguments, the leading zero of<br />

the variable number is optional (in other words, %G02 is same as %G2, %L02 is same as %L2,<br />

and $P02 is same as $P2). Predefined global variables (%G00…%G99) do not need a DECLAR<br />

statement since they are predefined as global. The same is true for predefined local variables<br />

(%L01…%L99).<br />

There is a predefined set of macro system variables. Some variables cannot be assigned values,<br />

and most that can be assigned can take only numeric values. See “Simulation Macro Variables”<br />

on page 205 for a list of available macro system variables.<br />

126 <strong>ICAM</strong> Technologies Corporation – Proprietary

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!