Re: we need official libs
- Posted by Lucius Hilley <lhilley at CDC.NET> Jun 27, 1999
- 496 views
Okay, But what about atom a sequence values, seq values = {1,7,9,-11,33,0,4.6,-4, -11, 5, 8, -11} a = min ({1,7,9,-11,33,0,4.6,-4, -11, 5, 8, -11}) -- a = -11 if you want to act on ALL of the -11's then you could do this seq = (values = a) -- seq = {0,0,0,1,0,0,0,0,1,0,0,1} Anywhere there was a -11 now there is a 1 everywhere else is 0. Lucius L. Hilley III lhilley at cdc.net +----------+--------------+--------------+ | Hollow | ICQ: 9638898 | AIM: LLHIII | | Horse +--------------+--------------+ | Software | http://www.cdc.net/~lhilley | +----------+-----------------------------+ > ---------------------- Information from the mail header ----------------------- > Sender: Euphoria Programming for MS-DOS > Poster: "Marco A. Achury P." <achury at ELDISH.NET> > Subject: Re: we need official libs > -------------------------------------------------------------------------- ----- > > Roderick Jackson escribió: > <SNIP> > > What do you think about a function that return where is the min/max value in a > sequence > > i = min ({1,7,9,-11,33,0,4.6,-4}) -- 4 is assigned to i (minimum is fourth > position) > i = max ({1,7,9,-11,33,0,4.6,-4}) -- 5 is assigned to i > > Even an Eu Style max!!! > > s = max ( { 1, 2, {3, 4}, 0}) -- {{3,2}}is assigned. The max is the > second element of the third element!!!! > > When there are many elements whit the max value, return a sequence as: > > s = max {1, 2, 3, 4, {1, 2, 3, 4}} -- {4, {5,4}} is assigned. > > These are only ideas... > > -- > +-+-+-+-+-+-+-+-+-+ > Marco A. Achury P. > http://members.xoom.com/achury > mailto:achury at eldish.net > ICQ: 19390207 > Caracas, Venezuela >