[scilab-Users] "error 240" issue while trying to open a file
Jacco Kramer
jacco.kramer at teb.nl
Thu Nov 13 09:08:47 CET 2008
Just guessing here, but I get that error when I can't open the file. For
instance, if the file doesn't exist when using the "old" option. Try
using the full path rather than just the filename, (
'~/Desktop/scene_modifie.dat' in linux ).
I sure hope this helped a little.
Jacco
-----Oorspronkelijk bericht-----
Van: thomas.auphan at free.fr [mailto:thomas.auphan at free.fr]
Verzonden: woensdag 12 november 2008 23:16
Aan: users at lists.scilab.org
Onderwerp: [scilab-Users] "error 240" issue while trying to open a file
Hi,
I'm a quite new user of Scilab and I have the following problem (please
excuse
me for my poor English !) :
When I try to execute this routine :
clear;
// Ouverture du fichier ASCII (en .dat) :
nomfic='scene_modifie.dat';
fid=file('open',nomfic,'old');
//Ici, le fichier a 256 lignes et 256 colonnes.
//On range le contenu du fichier dans une matrice de taille
//(256,256);
im=read(fid,256,256);
I=1:256;
J=1:256;
[...]
file('close',file());
Scilab returns something like that "error 240 : the file
"scene_modifie.dat"
already exists or write access denied. At line 4 of [...]" (I'm sure
that the
error number is 240).
I think that I'm not the first person who have this issue, but I didn't
find a
solution on the Web (including Scilab web site).
If someone has an explanation or a solution, could he explain me this ?
For more information about my issue, I can tell that:
1) I have this troubles with Linux + Scilab 5.0.3 (In this case, Linux
is
Xubuntu 8.04 (updated)) and Window 2000 + Scilab 5.0.3.
2) With Linux, I have checked my users rights :
-rwx------ 1 tauphan tauphan 1049088 2008-01-07 14:10 scene.dat
-rwx------ 1 tauphan tauphan 983040 2008-11-10 20:01 scene_modifie.dat
-rwx------ 1 tauphan tauphan 643 2008-11-10 08:38 Traitement image
scilab.sce
"Traitement image scilab.sce" contains the code of my routine.
With Windows 2000, I have also checked my rights and I worked as an
Administrator.
3) In both cases, the working directory (which contains "scene.dat",
"scene_modifie.dat" and "Traitement image") is on my Desktop (and I have
aslo
tried when the working directory is in a partition (FAT32) in common
with Linux
and Window)
4) I also tried to use fopen or fscanfMat but, Scilab doesn't manage to
open the
file.
5) The routine worked on an computer with Window 98 + Scilab 4.1.2
(though in
this case, Scilab in not very stable (Scilab 4.1.2 is not made for
Window 98)).
So, I think that the code of my routine seems to be free of syntax
errors.
Thank you very much for your help,
Best regards ,
Thomas AUPHAN
More information about the users
mailing list