Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Calculating the High and Low of it all
#11
HL = DataBaseValue
        If HL < Low Then Low = (_Round(HL * 100000)) / 100000
        If HL > High Then High = (_Round(HL * 100000)) / 100000


And *before* your DO-LOOP where you check those values, initialize the high/low variables.

LOW = *max variable value*
HIGH = *min variable value*

So for an unsigned byte, LOW = 255: HIGH = 0.  For an unsigned integer, LOW = 65535: HIGH = 0.

This way *any* database value will be less than LOW, setting it to the database limit, while the same is true with the HIGH.
Reply


Messages In This Thread
RE: Calculating the High and Low of it all - by SMcNeill - 10-19-2022, 07:24 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question need help calculating ratios madscijr 9 1,527 02-14-2025, 06:06 PM
Last Post: madscijr
  Cursor is showing low in graphics screen PhilOfPerth 2 585 11-06-2024, 07:50 AM
Last Post: PhilOfPerth
  Potencies high potencies Kernelpanic 4 1,097 10-08-2024, 01:34 PM
Last Post: Kernelpanic

Forum Jump:


Users browsing this thread: 1 Guest(s)