[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: load problems
From: |
Joao Cardoso |
Subject: |
Re: load problems |
Date: |
Fri, 04 Aug 2000 21:26:26 +0100 |
> On 3-Aug-2000, Joao Cardoso <address@hidden> wrote:
>
> | "John W. Eaton" wrote:
> | >
> | > On 2-Aug-2000, Ben Sapp <address@hidden> wrote:
> | >
> |
> | ...
> |
> | > Of course, Octave should probably also allow
> | >
> | > x = load ("some-odd-file-name.dat")
> | >
> | > so all of this would be unnecessary. Anyone care to implement it and
> | > submit a patch?
> | >
> | > jwe
Another try. Please check the docs wording.
Joao
PS-sorry, the enclosed patch also contains my structures/lists save/load
patch
- Command: load options file v1 v2 ...
or
`load("option_1",..., "file", "v1", "v2" ,...)'
or
[..., num] = load ...'
...
If using the third syntax of `load', the specified return variables
will be used to hold the loaded values. Variables will be loaded
in order until the return list is exausted. NUM hold the number of
sucessefully loaded variables.
[a, b, c, num] = load("foo.dat", "x1", "y", "x3")
gives, if "foo.dat" has variables X1, X2, X3 with values
`1,2,3'
a = 1
b = [](0x0)
c = 3
num = 2
Wildcarding the argument variables overwrites the corresponding
output variable, e.g. `[a, b, c, num] = load("foo.dat", "x*")'
will return only variable A with the last X* variable found, but
NUM will report that 3 variables has been loaded.
load-save.cc.patch
Description: Binary data