I don't quite understand localization of variable values in Block[]. Executing this code in the front end:
w = 1.11;
Block[{w}, w = 2; Plot[Sin[w x], {x, 0, 2 Pi}]]
leaves the value of w as 2. If I change it to:
w = 1.11;
Block[{w}, w = 2; Print[Plot[Sin[w x], {x, 0, 2 Pi}]]]
then the value of w is 1.11 after executing, as I expect.
Why is w not restored in the first instance? Any help appreciated... problem is, I know how to fix this case, but now I am unsure of when Block[] does and does not restore values of local variables.
--Phil