Post Reply 
list functions sugestion
09-23-2015, 05:48 AM
Post: #12
RE: list functions sugestion
hello

>L1:={4, 6, 9, 3};
>FOREACH L1 AS it if(it MOD 2 == 0) it=it-1; END;
>// now L1 is { 3, 5, 9, 3 }

L1-((L1 MOD 2)==0) does that

L1 MOD 2 does a modulo 2 of each element of L1
the ==0 will return a list of 0 and 1, with 1 for every element of L1 that is 0
and the final - removes that 1 in cases of equality mod 0 from L1

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
list functions sugestion - hpfx - 09-20-2015, 07:55 PM
RE: list functions sugestion - komame - 09-20-2015, 08:41 PM
RE: list functions sugestion - hpfx - 09-20-2015, 08:49 PM
RE: list functions sugestion - komame - 09-20-2015, 08:53 PM
RE: list functions sugestion - hpfx - 09-20-2015, 08:59 PM
RE: list functions sugestion - douganc - 09-21-2015, 07:15 AM
RE: list functions sugestion - parisse - 09-21-2015, 09:15 AM
RE: list functions sugestion - hpfx - 09-22-2015, 08:04 AM
RE: list functions sugestion - Tyann - 09-22-2015, 11:06 AM
RE: list functions sugestion - komame - 09-22-2015, 01:25 PM
RE: list functions sugestion - cyrille de brébisson - 09-23-2015 05:48 AM
RE: list functions sugestion - hpfx - 09-24-2015, 02:53 PM



User(s) browsing this thread: 5 Guest(s)