help-octave
[Top][All Lists]
Advanced

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

Re: loading the functions automatically


From: David Bateman
Subject: Re: loading the functions automatically
Date: Tue, 19 Jun 2007 22:33:07 +0200
User-agent: Thunderbird 1.5.0.7 (X11/20060921)

Kamaraju S Kusumanchi wrote:
> John W. Eaton wrote:
>> | 
>> | That is the function even_odd1 is loaded into the memory. Now if I go
>> | back to even_odd.m and change the function even_odd1, then the changes
>> | are not reflected back on the octave command line.
>>
>> Don't define the function in a script file.  Instead, just define the
>> function in a function file:
>>
> 
> The problem I have shown here is part of rather large task. The reason why I
> prefer scripts to functions is that in scripts, I can define multiple
> functions. This allows me to group related functions and put them into one
> single file rather than scattering them across different files (something
> like Fortran 95's modules). If I were to make all the functions in these
> scripts into separate function files then my directory will be full of
> files and it becomes very difficult (at least for me) to keep track of what
> is going on...
> 
> 

Sub-functions are also perfectly valid.. However, only the external
function is visible externally..

D.


>> Functions defined in scripts are not automatically reloaded because
>> doing that would have potentially odd side effects.
>>
> 
> OK! Thanks.
> 
> raju
> 



reply via email to

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