Primitive Datatypes

Purpose The datatypes are used in computations and parameter passing for methods and functions.

bool
Valid Values true
false
Example <if>
   <cond>
      <eval>
         <parm type="string" name="lname">Mati</parm>
         <parm type="string" name="fname">Kimanzi</parm>
         <expr>fname = lname</expr>
      </eval>
   </cond>
   <true>
      <xout>Your first and last names cannot be the same</xout>
   </true>
   <false>
      <xout>Thank you</xout>
   </false>
</if>

Checks to see if the first and last names are the same. If they are the <true> clause of the <if> statement would send the text Your first and last names cannot be the same to the output stream. Since in this example the names are different the <false> clause executes and sends the text Thank You to the output stream.


date
Valid Values Any valid date in the following formats:
#dd-mon-rr#
#dd-mon-rrrr#
#dd-mon-rr hh:mi:ss#
#dd-mon-rrrr hh:mi:ss#
#mm/dd/rr#
#mm/dd/rrrr#
#mm/dd/rr hh:mi:ss#
#mm/dd/rrrr hh:mi:ss#
Example <xout>The new date is </xout>
<xout>
   <eval>
      <parm type="date" name="date1">01-Jun-2002</parm>
      <parm type="int" name="offset">10</parm>
      <expr>date1 + offset</expr>
   </eval>
</xout>

Performs the date arithmetic and writes the text The new date is #01-Jun-2002 00:00:00# to the output stream.


double
Valid Values any real number up to 64 bits
Example <xout>Your numbers = <xout>
<xout>
   <eval>
      <parm type="double" name="a">7.12</parm>
      <parm type="double" name="b">2.5</parm>
      <expr>a + b</expr>
   </eval>
</xout>

Adds the two numbers together and writes the text Your numbers = 9.62 to the output stream.


float
Valid Values any real number up to 32 bits
Example <xout>Your numbers = <xout>
<xout>
   <eval>
      <parm type="double" name="a">7.12</parm>
      <parm type="double" name="b">2.5</parm>
      <expr>a + b</expr>
   </eval>
</xout>

Adds the two numbers together and writes the text Your numbers = 9.62 to the output stream.


int
Valid Values any whole number up to 32 bits
Example <xout>Your numbers = <xout>
<xout>
   <eval>
      <parm type="double" name="a">100</parm>
      <parm type="double" name="b">117</parm>
      <expr>a + b</expr>
   </eval>
</xout>

Adds the two numbers together and writes the text Your numbers = 217 to the output stream.



long
Valid Values any whole number up to 64 bits
Example <xout>Your numbers = <xout>
<xout>
   <eval>
      <parm type="double" name="a">100</parm>
      <parm type="double" name="b">117</parm>
      <expr>a + b</expr>
   </eval>
</xout>

Adds the two numbers together and writes the text Your numbers = 217 to the output stream.

short
Valid Values any whole number up to 16 bits
Example <xout>Your numbers = <xout>
<xout>
   <eval>
      <parm type="double" name="a">100</parm>
      <parm type="double" name="b">117</parm>
      <expr>a + b</expr>
   </eval>
</xout>

Adds the two numbers together and writes the text Your numbers = 217 to the output stream.


string
Valid Values any characters
Example <eval object="MyName">
   <eval>
      <parm type="string" name="lname">Mati</parm>
      <parm type="string" name="fname">Kimanzi</parm>
      <expr>fname + " " + lname</expr>
   </eval>
</eval>

Concatenates the first name with the space and the last name and assigns the result to the object MyName.