In Oz variables NEVER change their value. So if you want to use the
same identifier for a different value, you have to REDECLARE it. In
your case, you have to introduce a new Pid, In, and Out each time you
call OS.read. Note that you example has a similar problem with the
variables I and L.
kanchana vasudevan wrote:
Hello Sir,
The previous example u sent was clear. But I have a problem
in reassigning variables i.e. ' In' and 'Out' for multiple files. I
attempted this coding. But only one file gets converted to PDF.
for Int in 1;Int<10;Int+1
do
Pid In Out L I % declare local variables
in
{OS.pipe 'txt2pdf' ['C:/usr/'#Int#'.txt'] Pid In#Out}
{OS.read In 1000000 L nil I}
{Inspector.configure widgetShowStrings true}
for Line in {String.tokens L &\n} do
{Inspect Line}
end
end
Cheers,
raph
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users