I am a novice
qbasic programmer and have run into a problem with a legacy system which I inherited. I was hoping someone might be able to give me some direction.
result# = VAL(result$)
result# = result# / ps#
result$ = LTRIM$(STR$(result#))
result$ = LEFT$(result$, 8)
ps# is a value between (.01) and (.99).
I am having trouble with the result# not converting out of scientific notation when the VAL(result$) is at or below the (ps# / 10). The ouput for the final "result$" has the literal value and not the value converted back to a standard decimal number. The error does not occur on a consistent basis....sometimes the conversion works and sometimes it does not....But it always works when the VAL(result) is > the ps#. I cannot see a specific pattern.
I greatly appreciate any input anyone might have.
Thanks in advance.
qbasic programmer and have run into a problem with a legacy system which I inherited. I was hoping someone might be able to give me some direction.
result# = VAL(result$)
result# = result# / ps#
result$ = LTRIM$(STR$(result#))
result$ = LEFT$(result$, 8)
ps# is a value between (.01) and (.99).
I am having trouble with the result# not converting out of scientific notation when the VAL(result$) is at or below the (ps# / 10). The ouput for the final "result$" has the literal value and not the value converted back to a standard decimal number. The error does not occur on a consistent basis....sometimes the conversion works and sometimes it does not....But it always works when the VAL(result) is > the ps#. I cannot see a specific pattern.
I greatly appreciate any input anyone might have.
Thanks in advance.