VOGONS


First post, by Mike Green

User metadata
Rank Newbie
Rank
Newbie

Hi.

I am running DOSBox 0.74 under 64 bit Ubuntu 14.04, and I am having a problem with the VAL command. I have been running the same software on a 32 bit machine under ubuntu 12.10 with no problems. The program also runs fine on a 64 bit WIndows 7 machine.

Here is a sample program:
M0$ = "1"
If VAL(M0$) <> 1 then print "Error with VAL function"

Output: Error with VAL function

If I print M0$, and Val(M0$), they are indeed 1.

Am I going nuts 😕 ?

Thanks,

M...

Reply 1 of 5, by truth_deleted

User metadata

Run the dosbox debugger on both outputs, but I don't know whether your task is supported here.

Reply 2 of 5, by Mike Green

User metadata
Rank Newbie
Rank
Newbie

I have more info on the VAL() problem.

After some playing: Jan.08.2014
The Val() works fine in dosbox uner WIN8, 64bit and Ubuntu 12, 32 bt.
It does not work in dosbox under Ubuntu 14, 64 bit.

M0$ ="10"
if Val(M0$) <> 10 then print "not 10" (output "not 10")

In this example, I determined the Val(M0$) is somewhere between 9.9999 & 10. It is always a close approximation of the desired number.
I solved the problem by adding "CINT" as follows:

if CINT(Val(M0$)) = 10  then print "equals 10"   (output is "equals 10")

(CINT rounds up the decimal portion) 😀

Note that

SELECTION = Val(M0$) works fine

Hope this helps someone.

M...

Reply 3 of 5, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Did you use the SVN ? As 64 bit should be using the same FPU as 32 bit nowadays (which isn't the case in 0.74)

Water flows down the stream
How to ask questions the smart way!

Reply 4 of 5, by Mike Green

User metadata
Rank Newbie
Rank
Newbie

Hi.

Don't know what SVN is.