Hi, David, Thanks for your reply.
so `g1` is a expression and `g2` is a function. And `g1(t=2)` is a substitution and `g2(2)` is a function call. Have I understood correctly? Best Huayi On 2016年08月25日 21:49, David Joyner wrote:
On Thu, Aug 25, 2016 at 9:31 AM, 魏华祎 <[email protected]> wrote:Hi, guys, I define `g1` and `g2` in the following code, but I am not so clear about their difference. Hope you guys show me some clues about it. Thanks very much. ``` var('t') g1=4*t^2 + 3*t + 1 g2(t)=4*t^2 + 3*t +1 ```sage: var('t') t sage: g1=4*t^2 + 3*t + 1 sage: g2(t)=4*t^2 + 3*t +1 sage: g1(2) /Users/wdj/sagefiles/SageMath/local/lib/python2.7/site-packages/IPython/core/interactiveshell.py:2885: DeprecationWarning: Substitution using function-call syntax and unnamed arguments is deprecated and will be removed from a future release of Sage; you can use named arguments instead, like EXPR(x=..., y=...) See http://trac.sagemath.org/5930 for details. exec(code_obj, self.user_global_ns, self.user_ns) 23 sage: g1(t=2) 23 sage: g2(2) 23 Does that help?Best Huayi -- You received this message because you are subscribed to the Google Groups "sage-edu" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sage-edu. For more options, visit https://groups.google.com/d/optout.
-- You received this message because you are subscribed to the Google Groups "sage-edu" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sage-edu. For more options, visit https://groups.google.com/d/optout.
