[MAIN] [News] [Intro] [Features] [Download] [Installation] [Support] [Support+] [Docu] [Tutorial] [Bugs] [forum ] [wiki] [Mirror] [Authors] [Future] [License] [Win98 Setup Bug] [Subscribe] |
Bug DescriptionThe 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 BugThe 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.SolutionThe following line in the COMMAND(HEX) should be updated:Op = _EVALUATEEXPRESSION(CAR(PARAMETERLIST));to: Op = EVALUATEEXPRESSION(CAR(PARAMETERLIST)); Bug Workaround Until Solution is AvailableDo not pass a variable to the function HEX, use the ByVal operator to protect the argument.AcknowledgementMitchell Greess [m.greess@solutions-atlantic.com] has discovered this bug. |