Post Reply 
Cas.collect() doesn't work for division expression when it is used in program[SOLVED]
07-04-2018, 11:00 PM (This post was last modified: 07-06-2018 01:48 PM by vvolkan.)
Post: #1
Cas.collect() doesn't work for division expression when it is used in program[SOLVED]
Hi,
When i use collect() function in cas home screen it works without any problem. When i use collect() in multi command program which i shared in forum, it doesnt work for division expressions. Do you have any idea about the issue? I share screenshot and the code i tried collect() in the screenshot mc() comand.

EXPORT mc(var1)
BEGIN

var1:=collect(var1);

return (var1);

end;


multi command program full code link:
http://www.hpmuseum.org/forum/thread-11004.html


Attached File(s) Thumbnail(s)
       
Find all posts by this user
Quote this message in a reply
07-05-2018, 04:25 AM (This post was last modified: 07-05-2018 04:27 AM by parisse.)
Post: #2
RE: Cas.collect() doesn't work for division expression when it is used in program
Try with a CAS program (or insure that your expression is eval-ed). / is expected to be evaled to *inv() before any CAS command. If you mix CAS and non CAS execution, the argument of your program might not be evaled.
Find all posts by this user
Quote this message in a reply
07-05-2018, 04:51 PM
Post: #3
RE: Cas.collect() doesn't work for division expression when it is used in program
Did you try it with the various [CAS] simplify settings? {none, minimum, maximum}

-Dale-
Find all posts by this user
Quote this message in a reply
07-06-2018, 01:26 PM (This post was last modified: 07-06-2018 01:46 PM by vvolkan.)
Post: #4
RE: Cas.collect() doesn't work for division expression when it is used in program
I have added #cas mode to the code and make the cas.function operations in that part of the program and assigned function results to global variables in that cas part. Lastly i used variable in non-cas part of the program. Thanks for your suggestions. the code something like this:

transfervar;
#cas
mc1(var1):=
BEGIN

transfervar:=eval('collect(var1)');

END;
#end

//Second part of code or another code file:

EXPORT mc2()
BEGIN

return (transfervar);

END;
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: