Skip to content

Movenum Command

Obsolete

This command is replaced by the Move command.

See Also

Purpose

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

Syntax

movenum
    value
to
    variable

What It Does

Movenum checks the value of value to ensure it is a valid Number, evaluates it as a Number, and moves it to variable.

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

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

Notes

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

  • Movenum disables DataFlex's automatic type checking of variables. Therefore, if you movenum to a Date, Integer, Real, or String type variable, 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 movenum a valid date to a Number, Integer, or Real-type destination, it will be expressed as the number of days since Year Zero (Julian format).

  • Internally, the calc command is actually a movenum command.