Comparing integer variable... (1 Viewer)

  • Thread starter Thread starter JacobH
  • Start date Start date
J

JacobH

Guest
Without using an array...what is a method that one could compare a variable that gets displayed into a label, with the next number that is inserted into that same label after the previous one gets erased? I am trying to get the smallest variable of all the values that get displayed in this label and then erased when the next number gets entered into that label...

Sorry if this is a bit confusing!

Thanks,
Jacob
 
If I understand your problem.

First number displayed in label.

Code:
iCurrentValue = label1.caption
iLowestValue = iCurrentValue

Then on each subsequent label update:
Code:
iCurrentValue = label1.caption
If iCurrentValue < iLowestValue Then
[INDENT]iLowestValue = iCurrentValue
[/INDENT]
EndIf

This would give you the lowest overall value.
 

Users who are viewing this thread

Back
Top Bottom