force evaluation of the first argument of the function with_stdout
Subject: force evaluation of the first argument of the function with_stdout
From: jcano
Date: Wed, 30 Nov 2005 13:14:38 +0100
Hi,
How can I do force evaluation of the first argument of the function
with_stdout.
More precisely, I am trying to write a function to write a geomview file
in order to plot a parametric curve. The code is this:
geomview_curve(list,range,nticks,file_name):=block(
[t,numer:true,display2d:false],
with_stdout(file_name,
print("VECT"),
print("1 ",nticks," 1"),
print(nticks),
print("1"),
for t:range[2] thru range[3] step (range[3]-range[2])/nticks do
print( ev(subst(t,range[1],list[1]),float),
ev(subst(t,range[1],list[2]),float),
ev(subst(t,range[1],list[3]),float)),
print("1 0 0 1")
));
For any call, for instance geomview_curve(...,"curva"),
it always write a file named "$file_name" and not "curva".
I have seen a similar question in the mailing list but no answer.
Thanks in advances,
jose cano