[MAIN] [News] [Intro] [Features] [Download] [Installation] [Support] [Support+] [Docu] [Tutorial] [Bugs] [forum ] [wiki] [Mirror] [Authors] [Future] [License] [Win98 Setup Bug] [Subscribe] |
Bug DescriptionThe programfor i = "0" to "10" step "1" print i nextdoes not iterate through the cicle but prints 0 and stops. Bug Reason, What Causes the BugThe command implementing the stepping part of the loop ignores string values instead of converting it to numeric value.SolutionThe code in the file commands/while.c implementing the command named FORTO has to be changed. The lines:EndExpressionResult = EVALUATEEXPRESSION(PARAMETERNODE); ASSERTOKE; NEXTPARAMETER;following the COMMAND(FORTO) declarations has to be altered to EndExpressionResult = EVALUATEEXPRESSION(PARAMETERNODE); ASSERTOKE; if( EndExpressionResult && TYPE(EndExpressionResult) == VTYPE_STRING ){ if( ISSTRINGINTEGER(EndExpressionResult) ) EndExpressionResult=CONVERT2LONG(EndExpressionResult); else EndExpressionResult=CONVERT2DOUBLE(EndExpressionResult); } NEXTPARAMETER;The next release will deliver the corrected code. Bug Workaround Until Solution is AvailableIn case you can not recompile the program from source code avoid using expressions resulting a string at the end value of a foor loop.AcknowledgementMitchell Greess [m.greess@solutions-atlantic.com] has reported the bug. Thanks. |