Skip to content

Movestr Command

Obsolete

This command is replaced by the Move command.

See Also

Purpose

To move data to a variable without evaluation or any checking as to its eligibility for a particular data type.

Syntax

movestr
    value
to
    variable

What It Does

The movestr command moves the value of value to variable. Since any string of characters qualifies as a string, it does no type checking or evaluation. movestr does not evaluate expressions, although it can move strings that are expressions.

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

Notes

  • movestr never generates a type checking error such as DataFlex Error 51 (Bad format in expression (operand)), regardless of the actual type of variable.

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