Acronym comparisons

Top  Previous  Next

Conditionals can be formed employing logical conditions which are based on acronyms, which are character string values, but many only involve the eq , = , ne , or <> operators.  The forms are as follows:

Logical conditions.  The syntax is

 

If(paramcontainingacronym op acronym ,action);

or

Action$(paramcontainingacronym op acronym)

 

where op is one of the eq , = , ne , or <> operators.

You must do comparisons with other acronyms not with text strings.

Examples:

(Acronym.gms)

acronyms nameforit,nextone;

acronym  acronym3

acronym  doit

parameter textstrings(i)

     /i1 nameforit

      i2 nextone

      i3 acronym3/ ;

loop(i,

  if(textstrings(i)=nameforit,put 'Something special'););

aa(i)$(textstrings(i) =doit).. 3*x(i)=e=1;