121 Reputation

8 Badges

17 years, 126 days

MaplePrimes Activity

These are Posts that have been published by rno

<p>I wrote such a code (in Maple 11)</p>
<p><maple> f := unapply( n+m, m ); </maple></p>
<p><maple>print( f(1) ); </maple></p>
<p><maple>g := unapply( f(m), m ); </maple></p>
<p><maple>g(1) := f(1)+a; </maple></p>
<p><maple>print( f(1) ); </maple></p>
<p> </p>
<p>First print( f(1) ) prints   n+1, while second --- prints n+1+a.  Why?</p>
<p>I suppose that this is because of third line, which Maple interprets <br />
as ' g:= f ' (but it should not). Then changing the value g(1) changes <br />
f(1), too.</p>
<p>Isn't it strange?</p>
I am trying to create my own package (module). I have read a lot helps in Maple and search this forum. But I don't know why this doesnt work 1. There is no file in /home/rno/math/maple/lib/ rno@amd:~/tmp> ls -l /home/rno/math/maple/lib/ razem 0 (it is in polish; it means there is no file) 2. The Maple script look like this: rno@amd:~/tmp> cat convacc.mp MyModule := module() export f1, f2, f3; local loc1; option package; description "Ala ma kota"; f1 := proc() eval(loc1); end proc; f2 := proc( v ) loc1 := v; end proc;
Page 1 of 1