Upgrading to DataFlex 3.2: Difference between revisions

m
Code
m (Indent)
m (Code)
Line 346: Line 346:
Let's use an example to illustrate this. Look at the following line of DataFlex code:
Let's use an example to illustrate this. Look at the following line of DataFlex code:


<source lang="vdf">
showln (4 > 5)
showln (4 > 5)
</source>


In DataFlex 2.3b, this line would evaluate to show "5".
In DataFlex 2.3b, this line would evaluate to show "5".
In DataFlex 3.2, this line will evaluate to show "0" (meaning "False", since 4 is not greater than 5).
In DataFlex 3.2, this line will evaluate to show "0" (meaning "False", since 4 is not greater than 5).


The corrected line of code for DataFlex 3.2 to evaluate as it did in DataFlex 2.3 would be:
The corrected line of code for DataFlex 3.2 to evaluate as it did in DataFlex 2.3 would be:


<source lang="vdf">
showln (4 MAX 5)
showln (4 MAX 5)
</source>


The mathematical operators can now be used on strings, making their function more intuitive and compatible with other programming environments. However, this will result in some expressions evaluating differently in DataFlex 3.x than they did in 2.3.
The mathematical operators can now be used on strings, making their function more intuitive and compatible with other programming environments. However, this will result in some expressions evaluating differently in DataFlex 3.x than they did in 2.3.