Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Minimum & Maximum

Status
Not open for further replies.

ruizsingh

Technical User
Nov 10, 2000
1
US
I am stumped..... I have a set of numeric variables corresponding to a set of string variables and need to print the min and max of the numeric var. along with the corresponding string var.
 
Hi,
Try using TYPE ... END TYPE, then DIM an array of the TYPE.
To find min and max make
min = mytype.num(1)
max = mytype.num(1)
then check the rest. If larger max = mytype.num( ? ) where ? is the one being tested.
Same for min only smaller.

Then print the string associated with min and max.

If you have QB4.5 the example 'type_ex.bas' in dir 'advr_ex' is a place to start.

Good Luck,
Pappy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top