Qbasicnews.com

Full Version: Const not working properly?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Code:
const PTCL_RAD2DEG# = 57.2957795130824#
const PTCL_DEG2RAD# = .0174532925199433#
Or:
Code:
const PTCL_RAD2DEG = 57.2957795130824#
const PTCL_DEG2RAD = .0174532925199433#
Or:
Code:
const PTCL_RAD2DEG = 57.2957795130824
const PTCL_DEG2RAD = .0174532925199433
Or:
Code:
const PTCL_RAD2DEG# = 57.2957795130824
const PTCL_DEG2RAD# = .0174532925199433
(Tried them all just to be sure...)

However, they return:
57.2958
0.0174533
When used.

So, why no double float?
Have you tried DEFDBL before that code?
Tried, no difference.

And shouldnt be needed if I use #
You'd think that, wouldn't you?

You'd also think FB would support long longs. Big Grin
Hehe, Big Grin
Nothing wrong with them, but PRINT would cut down the printed fpoint number, it's a bit better on next version (it prints in 0.11 here as:)

C:\prg\code\bas\freeBASIC>test.exe
57.2957795130824
1.74532925199433e-002
With outputs so long we will need PRINT USING ... 8)
Oh, silly print then *bashes print for a while* Big Grin
*still hinting at long longs* Big Grin Big Grin Big Grin
long longs and short shorts! err nevermind :p.
Pages: 1 2