[scilab-Users] Help regarding file management

Serge Steer Serge.Steer at inria.fr
Wed Aug 31 13:46:51 CEST 2011


Le 31/08/2011 13:22, ashwin damle a écrit :
> Hello,
>
> I am using scilab 5.3.3 on ubuntu 11.04.... I have a problem using the
> file management. Take for example the help  for files
>
> u=file('open','foo.dat','unknown')
> for k=1:4
>   a=rand(1,4)
>   write(u,a)
> end
> file('rewind',u)
> x=read(u,2,4)
>
> file('close',u)
>   
> In the code above, if I execute the program it works. If I execute the
> program again, with unknown changed to 'old', it gives an error saying
> foo.dat already exists of access is denied. Then, what I do is i
> delete the foo.dat file in the current directory and change the
> 'unknown' to 'new'...then I execute it works but next time after
> changing it 'new' to 'old' I execute again but it won't work giving
> the same error.
>
> What is the problem? To put it simply, can you suggest a working part
> of file management.
>
> Thanks.
>
> -- 
> Ash.D
The 'old' option opens the file read-only....

Serge Steer
INRIA



More information about the users mailing list