swirl Guide to OmniMark 5   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesOMX VariablesErrors
 
    Related Syntax  
Integer data type

You can use the integer data type to store and manipulate integer values between -2,147,483,648 to 2,147,483,647. In a future version of OmniMark, integers will become unbounded, so you should avoid writing code which depends on the current size limit of integers or on the wrapping of values which occurs when you exceed the maximum or minimum values of an integer. For instance, in current OmniMark, the expression 2,147,483,647 + 10 gives the result -2147483639. In a future version it will give the result 2147483657.

If you need to write code that depends on the specific behavior of 32-bit integers, or if you need to represent a 32-bit bit field, you should use the int32 data type.

Integers are automatically initialized to 0.

You can initialize integer variables when you declare them:

  global integer quantity initial {0}

You can set the value of an integer to the value of a numeric literal, another integer, the result of an integer expression, or a stream expression or literal string that evaluates to an integer value:

  set quantity to 5
  set quantity to number-of-things
  set quantity to number-of-children * apples-per-child
  set quantity to form-data{"quantity"}
  set quantity to "27"

You can use the following operators with integers:

      Related Syntax
   global, local
 
----

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ OMX ] [ OMX ] [ ERRORS ]

Generated: August 11, 2000 at 3:06:22 pm
If you have any comments about this section of the documentation, send email to docerrors@omnimark.com

Copyright © OmniMark Technologies Corporation, 1988-2000.