Bug Report 2001/10/19-v1.0b26-br02


[MAIN]
[News]
[Intro]
[Features]
[Download]
[Installation]
[Support]
[Support+]
[Docu]
[Tutorial]
[Bugs]
[forum ]
[wiki]
[Mirror]
[Authors]
[Future]
[License]
[Win98 Setup Bug]
[Subscribe]
Bug Report id=2001/10/19-v1.0b26-br02
Affected versions:v1.0b26
Severity:Low

Bug Description

The function HEX converts its argument to LONG if this is a variable. For example the following program:
varReal = 60.5e0
print Hex(varReal), " ",varReal, "\n"

prints the following
3C 60

Bug Reason, What Causes the Bug

The implementation of the function HEX uses the macro _EVALUATEEXPRESSION instead of EVALUATEEXPRESSION The macro starting with the _ character evaluates the function argument resulting the argument without creating a copy of it. This optimizes code in case the command or function does not alter the argument/parameter value. This is not the case in the implementation of the function HEX. HEX converts the argument value to LONG.

Solution

The following line in the COMMAND(HEX) should be updated:
Op = _EVALUATEEXPRESSION(CAR(PARAMETERLIST));

to:
Op = EVALUATEEXPRESSION(CAR(PARAMETERLIST));

Bug Workaround Until Solution is Available

Do not pass a variable to the function HEX, use the ByVal operator to protect the argument.

Acknowledgement

Mitchell Greess [m.greess@solutions-atlantic.com] has discovered this bug.

This page was generated January 28, 2010 9:58:43