Skip to content

Moveint Command

Obsolete

This command is replaced by the Move command.

See Also

Purpose

To check data to make sure it is a valid Integer, and move it to a variable.

Syntax

moveint
    value
    to
    variable

What It Does

moveint checks the value of value to ensure it is a valid Integer, evaluates it as an integer, and moves it to variable.

If the data in value is not a valid Integer, DataFlex Error 51, 52, or 54 is triggered (depending on the type of error—see below), and the data is not evaluated. moveint does evaluate expressions.

When a move command addresses an explicit variable of Type Integer, the compiler automatically replaces the move command with a moveint command. Where you know that data is being moved to a destination of Type Integer, using moveint instead of move can save a very small amount of time per command at compile time.

Notes

  • moveint checks the eligibility of data for the integer type. For example:
  • If you moveint a value such as 2*2, DataFlex Error 51 (Bad format in expression (operand)) will be triggered.
  • If you moveint an expression such as 2 2, DataFlex Error 52 (Bad format of expression (operator)) will be triggered.
  • If you moveint an expression such as +2, DataFlex Error 54 (Invalid symbol in expression) will be triggered, regardless of the actual type of variable.

  • moveint disables DataFlex's automatic type checking of variables. Therefore, if you moveint to a Date, Number, Real, or String type destination, no error will be declared at compile time, nor will one be declared at runtime. This effect is harmless, as long as you intend it.

  • If you wish to strip fractional (decimal) components from the value of any variable of Type Number, you can use:

moveint variable to variable

where variable is the same Number type variable.