Dear Robert,

I can reproduce the problem on my machine.
There seems to be a problem with the example or with the File.ozf implementation.

There are two different ways to open a file in Oz:
{New Open.file init(url:URL)}
and
{New Open.file init(name:NAME)}

The function File.readList of the example uses the first form. But "stdin" is not a valid URL. It is a valid filename, however.

If you replace the line
L = {File.readList stdin}
with

F = {New Open.file init(name:stdin)}
L = {F read(list:$ size:all)}
{F close}

the example should work as expected.

Cheers,
 Wolfgang


Robert Godfroid wrote:
Hi,

I'm a newbie in Oz and currently working with CTM (3rd printing)
When I try to execute the standalone program wordapp.oz (pp 225-230), I've got this error message:

***error in URL support
***
*** Cannot locate file
*** File name: stdin
*** Operation: open
***
*** Call stack:
*** procedure 'get' in file "f:cygwin/home/Administrator/Mozart-1-3-2/mozart/share/lib/init/Resolve.oz", line 394, column 6, PC = 24427592
**

The only change I've made in the code shown on page 227 is the following: instead of File in the import part, I had to write File at <location of File.ozf> on my computer.

On my computer, Mozart is running on Windows Vista Edition familiale Premium

I can't figure out where the problem comes from.
Is it a problem with Vista? with cygwin? with the funcor File?

Thanks for any help

Cheers

Robert

_________________________________________________________________________________ mozart-users mailing list [email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users


_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to