Post Reply 
complementary function to unapply()
04-01-2015, 05:42 AM
Post: #10
RE: complementary function to unapply()
Yes, very cool! Thanks for the Information.
I could get Expression() finished in a first pre-alpha version. :-)
Code:

#cas
expression(args):=
BEGIN
//  local pos,str;
//  str:=string(args);
//  pos:=instring(str,"->")+2;
//  CAS(mid(str,pos));

//  LOCAL fun:=(args[2]);
  
  LOCAL argv:=[args]; //keep this nomenclature
  LOCAL argc:=size(argv);

  IF type(argv[1]) == DOM_FUNC THEN
    RETURN (argv[1])[4];
  ELSE
   RETURN (argv[1]);
  END;
END;
#end

Is it a good advice to create a cas program? I would prefer to find Expression in the Toolbox menu but it can only show normal programs.

func[2] is also a Beauty as far as it seems to be the Parameter vector of the function! What I would like to achieve next is a function Information program. Namely an Input form that lists all used variables with their content. I hope that Input can be used for global variables - so you would get a nice overview if all variables have their correct value before you calculate the function with them.
INPUT() is a beast that has to be tamed....[/code]
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: complementary function to unapply() - leprechaun - 04-01-2015 05:42 AM



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