Monday May 29, 2017

       
      SteelArrow Basics
      SteelArrow Tags
  SteelArrow Functions
  SteelArrow Objects
  Advanced Topics
  WAS Overview
   
   
       
      Overview
  Code Samples
  Site Search
   
   
   


Get SteelArrow!     
  SteelArrow Operators    
 
 
 
Return to Basics Page
 
SteelArrow supports numerous operators, allowing things such as string concatenation, basic math and boolean operations.

The following list describes each operator that is available to the developer:

Side Note: SteelArrow is a case-insensitive language. As a result, a variable named variableName is the same variable as VARIABLENAME Likewise, the below list of operators is also case-insensitive: .eq. is the same as .Eq.

 
 
 Mathematical Operators
+Addition, or string concatenation if either value is not numeric
&String concatenation
-Subtraction
*Multiplication
/Division
%Modulus
.mod.Modulus
 
 Comparison Operators
.eq.Equality
.ne.Not Equal
.gt.Greater Than
.ge.Greater Than or Equal
.lt.Less Than
.le.Less Than or Equal
 
 Boolean Operators
.and.AND
&&AND
.or.OR
||OR
!NOT
 
TRUEStatic value of 1
FALSEStatic value of 0 or ""
 

The following are examples of the use of some of the listed operators:


   <!--- Using the operators to compare dates --->
   <SASET NAME=date1 VALUE="12/06/00 12:35">
   <SASET NAME=date2 VALUE="Jan 05, 2001">
   <SAIF COND=date1 .gt. date2>
      date1 is later than date2
   <SAELSE>
      date2 is later than date1
   </SAIF>

   <!--- Using the operators in an expression --->
   <SAIF COND=(var + 10) .eq. var2 .and. TRUE .eQ. VAR1>
      <SAOUTPUT VALUE=var & var2>
   </SAIF>

   <!--- Is the variable defined --->
   <SAIF COND=!IsDefined( PARAM.var )>
      PARAM.var is NOT defined!<BR>
   </SAIF>

   <!--- Creates var4 with a value of 'test56' --->
   <SASET NAME=var4 VALUE="test" + 56>

   <!--- Creates var5 with a value of 'test56' --->
   <SASET NAME=var5 VALUE="test" & 56>

   <!--- Creates var6 with a value of '60' --->
   <SASET NAME=var6 VALUE="4" + "56">

   <!--- Creates var7 with a value of '456' --->
   <SASET NAME=var7 VALUE="4" & "56">

   <!--- Creates var8 with a value of TRUE --->
   <SASET NAME=var8 VALUE="123" .ne. 456>

         
 





Copyright © 1998-2004 Tomahawk Technologies Inc.
Privacy Policy