[Aimmath-developers] [ aimmath-Bugs-772556 ] function in map becomes a t
Brought to you by:
gustav_delius,
npstrick
From: SourceForge.net <no...@so...> - 2003-08-27 14:03:40
|
Bugs item #772556, was opened at 2003-07-16 19:31 Message generated for change (Settings changed) made by gustav_delius You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=439479&aid=772556&group_id=44411 Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Gustav W Delius (gustav_delius) Assigned to: Nobody/Anonymous (nobody) Summary: function in map becomes a t Initial Comment: The following will print [1,4,9] h> f := x->x^2;; b :=eval(map(f,[1,2,3])); t> $$@b@$$ a>1 end> This is expected. But the following will print [ t(1), t(2), t(3)] h> b := eval(map(x->x^2,[1,2,3])); t> $$@b@$$ a>1 end> Why? Where did the t come from? ---------------------------------------------------------------------- Comment By: Gustav W Delius (gustav_delius) Date: 2003-07-18 22:01 Message: Logged In: YES user_id=737246 Hi Gustav, I would say that the t was a local variable generated by the codegen Maple package. Occasionally, I have found that t has been assigned to 1 and just recently E was set to 0 for a quiz. I believe these are all codegen bugs, nothing to do with the AIM code. In many contexts the arrow notation fails to work in a quiz question and you need to use the proc() end; syntax. If you want to use an anonymous function in b use unapply, e.g. h> b := eval(map(unapply(x^2, x), [1,2,3])); Unfortunately, these bugs will remain I suspect until the usage of codegen is replaced by CodeGeneration. Anyway, when Neil gets back, he may be able to elaborate. Regards, Greg ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=439479&aid=772556&group_id=44411 |