home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.visual.basic      MS Visual Basic discussions, NOT dot-net      10,840 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 9,380 of 10,840   
   Raoul Watson to Michael Warner   
   Re: Bit of a problem - HELP   
   02 Apr 05 12:39:18   
   
   From: WatsonR@IntelligenCIA.com   
      
   "Michael Warner"  wrote in message   
   news:yf6dnT_-ppi-TtXfRVn-1A@adelphia.com...   
   > Steve Gerrard wrote:   
   > > "Michael Warner"  wrote in message   
   > > news:h9OdnU4ggN5ZB9XfRVn-1w@adelphia.com...   
   > >   
   > >>I can't seem to get a working function for finding the lowest value of   
   > >>the array.  If anyone could help me, I would be most greatful.   
   > >>   
   > >>Private Function HiCard()   
   > >>Dim intHiCard As Integer   
   > >>Dim intIndex As Integer   
   > >>   
   > >>For intIndex = LBound(ArrScore) To UBound(ArrScore)   
   > >>   If ArrScore(intIndex) > intHiCard Then   
   > >>       intHiCard = ArrScore(intIndex)   
   > >>   End If   
   > >>Next intIndex   
   > >>   
   > >>HiCard = intHiCard   
   > >>   
   > >>End Function   
   > >>   
   > >   
   > >   
   > > I will start you off, and hope you recognize a pattern:   
   > >   
   > > Private Function LoCard()   
   > > Dim intLoCard As Integer   
   > > Dim intIndex As Integer   
   > >   
   > > intLoCard = HiCard()    'starting value   
   > >   
   > > For intIndex = LBound(ArrScore) To UBound(ArrScore)   
   > >     ' and you know the rest....   
   > >   
   > >   
   > the low card now returns a value of 0   
      
   You definitely don't want to include zero..   
      
   For intIndex = LBound(ArrScore) To UBound(ArrScore)   
       If ArrScore(intIndex) > 0 Then   
             If ArrScore(intIndex) < intLoCard Then   
                 intLoCard = ArrScore(intIndex)   
             End If   
       End If   
   Next intIndex   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca