Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Determine a value is INTEGER
#12
I would consider doing something likeĀ  `IF x > intval - .00001 AND x < intval + .00001 THEN` to check for an integer value, that allows for the fact that it may not always be an exact integer but is still close enough for your approximation to work. The other suggestions on this page could work for detecting if it's an exact integer value, but that's probably not what you want to do since that's the likely cause of the "hiccups" you mentioned where the value isn't actually an integer even though it "should" be.
Reply


Messages In This Thread
Determine a value is INTEGER - by TerryRitchie - 07-25-2024, 07:40 PM
RE: Determine a value is INTEGER - by DSMan195276 - 07-26-2024, 12:17 AM
RE: Determine a value is INTEGER - by Pete - 07-26-2024, 12:23 AM
RE: Determine a value is INTEGER - by DSMan195276 - 07-26-2024, 02:33 AM
RE: Determine a value is INTEGER - by Pete - 07-26-2024, 02:41 AM
RE: Determine a value is INTEGER - by Jack - 07-26-2024, 12:25 PM
RE: Determine a value is INTEGER - by Petr - 07-26-2024, 03:02 PM
RE: Determine a value is INTEGER - by Jack - 07-26-2024, 05:25 PM
RE: Determine a value is INTEGER - by DSMan195276 - 07-26-2024, 07:02 PM
RE: Determine a value is INTEGER - by Jack - 07-26-2024, 08:14 PM
RE: Determine a value is INTEGER - by Kernelpanic - 07-26-2024, 10:57 PM
RE: Determine a value is INTEGER - by DSMan195276 - 07-27-2024, 04:30 AM
RE: Determine a value is INTEGER - by Kernelpanic - 07-27-2024, 05:03 PM
RE: Determine a value is INTEGER - by SMcNeill - 07-27-2024, 01:49 PM
RE: Determine a value is INTEGER - by bplus - 07-27-2024, 02:43 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Why are SINGLE variables faster than INTEGER variables ? Elzaimer 18 2,332 07-07-2025, 05:01 AM
Last Post: ahenry3068
  generating a random number in the full range of that number? (Integer, Long) madscijr 2 645 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,399 01-29-2025, 11:12 PM
Last Post: Pete
  When MUST a variable be an Integer? Dimster 3 868 04-27-2024, 07:04 PM
Last Post: TerryRitchie
  Looking for a solution to determine the thread count via API SagaraS 4 1,051 04-08-2024, 04:19 AM
Last Post: SpriggsySpriggs

Forum Jump:


Users browsing this thread: 1 Guest(s)