[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: loading the functions automatically
From: |
Kamaraju S Kusumanchi |
Subject: |
Re: loading the functions automatically |
Date: |
Wed, 20 Jun 2007 01:02:54 -0400 |
User-agent: |
KNode/0.10.4 |
David Bateman wrote:
> 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..
>
That's a great idea. Thanks for pointing it out. I did not know about them
before. I will look into it.
raju
--
Kamaraju S Kusumanchi
http://www.people.cornell.edu/pages/kk288/
http://malayamaarutham.blogspot.com/