|
From: | Klaus Braun |
Subject: | [Octave-bug-tracker] [bug #55495] autoload should only work for .oct files; documentation should also be clear about that |
Date: | Fri, 18 Jan 2019 20:10:32 -0500 (EST) |
User-agent: | Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134 |
Follow-up Comment #4, bug #55495 (project octave): Thank you John. I understand how function files and script files work (at current implementation). I was just playing around and searching for a solution for what I want to do. I want to write a single file with several functions (all callable from outside) for e.g. dealing with a peripheral device. - one function which opens a connection to the device and does some initialization - one function for writing to the device - one function for reading from the device - maybe some other functions - one function to close the connection With a function file I can see only one function - no solution. With a script file I must call at first the script file (to load all the functions) and then I can call the initialization function. I wanted to save this double initialization procedure. When I put the initialization code at the beginning of the script (outside a function) then I can not pass any parameters and can get no return value (or can I?). Then I had the idea to use a function file with the initialization function as the callable function. And in this initialization function I tried to use autoload to load (make callable) the other functions. (And the close function could unload the functions.) Therefore it would be nice when autoload would work for .m files. While testing this I discovered the strange behaviour of this (original) issue. _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?55495> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |