highest or lowest variable in an array; how do you find it?


Closed Thread
Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Nov 2009
    Location
    London
    Posts
    251


    Did you find this post helpful? Yes | No

    Default Re: highest or lowest variable in an array; how do you find it?

    OOps, my mistake. Instead use the following:

    Code:
    i       var byte
    lowest  var byte
    highest var byte
    CheckHigh Var Byte
    CheckLow Var Byte
    myarray var byte[50]
    
    CheckHigh=0 : CheckLow=255
    for i = 0 to 48
       CheckHigh= MyArray[i] MAX MyArray[i+1]
       If CheckHigh>Highest then Highest=CheckHigh
       Lowest= MyArray[i] MIN MyArray[i+1]
       If CheckLow<Lowest then Lowest=CheckLow
    next i
    Thanks Dave for correcting me
    Last edited by Megahertz; - 13th July 2012 at 17:10.

  2. #2
    Join Date
    Dec 2009
    Location
    Kalamazoo
    Posts
    42


    Did you find this post helpful? Yes | No

    Default Re: highest or lowest variable in an array; how do you find it?

    thanks guys .
    i was thinking of doing it like post #2, and i thought there was an easier way to skin it. this really helps alot with all this options.
    NAG CON WIFE!
    WIFE VAR MOOD

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts