Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'SetDelayed (:=)' topicStudent Support Forum > General > "SetDelayed (:=)"

Next Comment >Help | Reply To Topic
Author Comment/Response
tanya
07/29/03 1:22pm

Hi. Could someone please tell me whether the below is considered bad form?


(* If I input this *)
f[dummyVar_] = a dummyVar;
a = 2;
{f[1],f[{1,3,5}]}
a = 5;
{f[1],f[{1,3,5}]}

(* I get this output:
{2,{2,4,6}}
{5,{5,10,15}}
*)


Is this faster than using SetDelayed?

thanks so much,
tanya

URL: ,

Subject (listing for 'SetDelayed (:=)')
Author Date Posted
SetDelayed (:=) tanya 07/29/03 1:22pm
Re: SetDelayed (:=) Forum Modera... 07/31/03 12:25pm
Next Comment >Help | Reply To Topic