MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

A ToExpression question


f1[x_] := Print[x];
f2[x_] := ToExpression["Print[x]"];
f3[x_] := Module[{y = x}, ToExpression["Print[y]"]];
f4[x_] :=  Block[{y = x}, ToExpression["Print[y]"]];

Scan[#[0]&,{f1,f2,f3,f4}]

0
x
y
0

Why don't f2 and f3 print 0 ?


  • Prev by Date: Smoothing Splines
  • Next by Date: False image plot
  • Previous by thread: Re: Smoothing Splines
  • Next by thread: Re: A ToExpression question