home *** CD-ROM | disk | FTP | other *** search
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
- Path: sparky!uunet!gatech!paladin.american.edu!auvm!DGOGWDG1.BITNET!LHINNER
- Message-ID: <REXXLIST%92082923045285@DEARN>
- Newsgroups: comp.lang.rexx
- Date: Sat, 29 Aug 1992 22:38:03 MSZ
- Sender: REXX Programming discussion list <REXXLIST@UGA.BITNET>
- From: ludger hinners-tobraegel <LHINNER@DGOGWDG1.BITNET>
- Subject: compare a number with a stem
- Lines: 28
-
- subject: comparing a sorted stem with a given number
- platform: cms
-
- hello rexxperts,
-
- I hope my question will be only a little one.
-
- I have a sorted stem. Its elements are numbers (floating point).
- Par example 1,000 numbers between 1 and 10.
- And I have a single variable, say a=7.
- Now I would like to know, how many (percent) of the stem's elements
- are bigger than the variable a.
-
- Is there a quicker solution than the code posted below?
-
- Thanks in advance!
-
- Ludger Hinners
- Institute of agriculture economics
- University of Goettingen
- Germany
-
-
- cnt=0
- do i=s.0 to 1 by -1
- if s.i>a then cnt=cnt+1
- end i
- say cnt
-