[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
unable to convert filename
From: |
John W. Eaton |
Subject: |
unable to convert filename |
Date: |
Mon, 29 Mar 1999 12:31:28 -0600 (CST) |
On 28-Mar-1999, Daniel Heiserer <address@hidden> wrote:
| I ran into a problem while loading PLAIN ascii files which where NOT in
| the current directory.
| AFAIK octave looks in the first line if he can something like "#name:"
| If it is not there he tries to do a "$filename=~s/\..*//;" (in perl
| syntax).
| Unfortunately this filename might contain still characters which are not
| allowed for filenames like "/".
| I see two ways to avoid that problem:
| 1) convert ALL not-allowed characters to "_"
| 2) take the filename only (get rid of directory structure)
| and then use "1)".
|
| octave:1> load results/KAA.00000199
| error: load: unable to convert filename `results/KAA.00000199' to valid
| identifier
| error: evaluating index expression near line 1, column 1
| octave:1>
|
| I use octave 2.0.11. Maybe it is fixed in a later version. If not
| could somebody do that?
The current test release of Octave should be able to handle your
specific example, but it does not do all of the conversions you
suggest. Why don't *you* take a crack at it? It should not be that
hard.
Anyway, here is an transcript of an example session using the current
2.0.x sources:
$ cat results/KAA.00000199
1 2 3 4
5 6 7 8
$ octave
GNU Octave, version 2.0.13.96 (i686-pc-linux-gnulibc1).
Copyright (C) 1996, 1997, 1998 John W. Eaton.
This is free software with ABSOLUTELY NO WARRANTY.
For details, type `warranty'.
octave:1> load results/KAA.00000199
octave:2> who
*** local user variables:
KAA
octave:3> KAA
KAA =
1 2 3 4
5 6 7 8
jwe