Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
When MUST a variable be an Integer?
#4
(04-27-2024, 03:39 PM)Dimster Wrote: You must be right b ... something has to be rounding the index but only when I have it printed to the screen. After running my routines again (despite my screen showing QS = 2) I have discovered that after 42 sorts is not the same value of QS actually being used in the program run. The program run results are coming up as accurate for QS = 2.1 and QS = 2.2 no matter what the sort count is. So happy my resulting values are accurate. I guess, to display the correct QS value on the screen I perhaps should convert it display the string value of QS rather than the numeric value.

These things can drive you to drink. I appreciate the help ++

Somewhere in your code you are assigning your SINGLE variable to an INTEGER variable. When this is done anything after the decimal point is dropped.

Look around your code and see if this may be happening.
New to QB64pe? Visit the QB64 tutorial to get started.
QB64 Tutorial
Reply


Messages In This Thread
When MUST a variable be an Integer? - by Dimster - 04-27-2024, 02:28 PM
RE: When MUST a variable be an Integer? - by TerryRitchie - 04-27-2024, 07:04 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  for performance, what's the best variable type to use for boolean _TRUE & _FALSE ? madscijr 12 1,256 09-29-2025, 02:59 PM
Last Post: dakra137
  Why are SINGLE variables faster than INTEGER variables ? Elzaimer 18 2,372 07-07-2025, 05:01 AM
Last Post: ahenry3068
  generating a random number in the full range of that number? (Integer, Long) madscijr 2 662 05-01-2025, 09:11 PM
Last Post: madscijr
  testing a number's quare root is an integer and casting to a value? madscijr 22 3,484 01-29-2025, 11:12 PM
Last Post: Pete
  Determine a value is INTEGER TerryRitchie 17 3,334 07-27-2024, 05:03 PM
Last Post: Kernelpanic

Forum Jump:


Users browsing this thread: 1 Guest(s)