Post Reply 
(50G) Inverse Permutation
05-28-2015, 03:12 PM (This post was last modified: 05-28-2015 03:52 PM by Didier Lachieze.)
Post: #6
RE: HP 50G: Inverse Permutation
Does it return the same error message for {1 3 3 4 5}?

Here is the updated version with error handling:

Code:
EXPORT InvPerm(list)
BEGIN
  LOCAL p;
  MAKELIST(IFTE(p:=POS(list,X),p,ASC(0)),X,1,SIZE(list));
END;
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(50G) Inverse Permutation - Gerald H - 05-28-2015, 09:15 AM
RE: HP 50G: Inverse Permutation - Gerald H - 05-28-2015, 11:44 AM
RE: HP 50G: Inverse Permutation - Gerald H - 05-28-2015, 02:08 PM
RE: HP 50G: Inverse Permutation - Didier Lachieze - 05-28-2015 03:12 PM
RE: HP 50G: Inverse Permutation - Gerald H - 05-28-2015, 06:17 PM
RE: HP 50G: Inverse Permutation - Gerald H - 05-29-2015, 05:23 AM



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