October 30, 2025, 01:14:45 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


PRINT USING

Started by Bill-Bo, June 02, 2013, 03:03:41 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bill-Bo

LarryMc,

I cannot get the PRINT USING to work properly. In Distance and Bearing
program, I want to print out to 3 decimal places.

Here's the problem. I'm testing with a line:

   PRINT USING("#####.###", Kilometers)

Now, if Kilometers turns out to be 12345.98765, it will display:

  0.000

If I change to #####.##, it comes out:

0.00

It is only affecting the number of decimal places, but not
displaying the numbers.

Bill

P.S. Never mind. I went back and change a variable that
was FLOAT to DOUBLE and it worked. I going to change
the ones for statute and nautical and see what happens.

billhsln

I usually I have to use:   USING("%f####.#####",hucost), where hucost is a FLOAT.

Bill
When all else fails, get a bigger hammer.

Bill-Bo

billhsln,

Thanks. By changing my variables to DOUBLE,
they print out. I'm going to look in the guide
for the different formats for USING. I didn't
see them in the appendix.

Thanks,

Bill