Loading ...
Sorry, an error occurred while loading the content.

19844Re: [Clip] Finding Minimum Value in Array

Expand Messages
  • Hugo Paulissen
    Nov 2, 2009
    • 0 Attachment
      OK Don, Sorry Flo,

      Forget my last post; I see what you mean... Now I *do* remember the padding zero issue! It's getting rusty inside...

      Hugo




      ________________________________
      From: Hugo Paulissen <hugopaulissen@...>
      To: ntb-clips@yahoogroups.com
      Sent: Mon, November 2, 2009 4:28:06 PM
      Subject: Re: [Clip] Finding Minimum Value in Array

       
       
      Hi Don,
       
      Quite possible that I just got lucky ;-), but I'm not so sure we need a numeric sort for this. I do not recall the reason for the zero-padding, but it doesn't seem necessary in this case.
       
      In any case: if I add some other values to the array, it appears that the lowest value is returned every single time.
       
      ^!SetArray %Array%=03,8, 329,1,1.25, 7,10.34,4, 9,6,2,5,11, 0.25,0.1, 10000,20, 0.0119,10, 0.012
       
      Hugo
       
       
      >>> 
      Doesn't work Hugo,

      ^!SetListDelimiter ,
      ^!SetArray %Array%=3,8, 329,7,10. 34,4,9,6, 2,5,11
      ^!SetListDelimiter ^%NL%
      ^!SetArray
      %Array%=^$StrSort( "^$StrReplace( ",";"^%NL% ";"^%Array% ";0;0)$"; False;True; False)$
      ^!Info ^%Array1% ^%NL% ^%Array%

      You just got lucky :-)

      We always zero pad because I use your method to zero pad. We need a
      numeric sort

      [Non-text portions of this message have been removed]







      [Non-text portions of this message have been removed]
    • Show all 15 messages in this topic