help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Octave question: Integrating .dat files in functions?


From: Jordi Gutiérrez Hermoso
Subject: Re: Octave question: Integrating .dat files in functions?
Date: Tue, 13 Dec 2011 10:03:32 -0500

On 13 December 2011 06:24, marco atzeri <address@hidden> wrote:

> sum is a reserved word for an already existing function.
> So you can not use is for a variable.

Actually, you can. Except for keywords, any alphanumeric symbol is a
valid variable name. You can do

    sum = 0;

and no longer be able to use the sum function directly. You can
restore the original function by doing

    clear sum

But if you did

    sum = 0;
    clear = "true";

then there are more gymnastics to go through to restore the functions. ;-)

I actually mostly prefer this feature. It would be a bit annoying if i
and j were always unavailable for index variables because they're
already taken for the imaginary unit.

- Jordi G. H.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]