[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Path?/dispatch error on starting Octave but path works
From: |
Henry F. Mollet |
Subject: |
Re: Path?/dispatch error on starting Octave but path works |
Date: |
Mon, 31 May 2004 11:31:18 -0700 |
User-agent: |
Microsoft-Entourage/10.1.1.2418 |
Thanks but I don't understand. I've checked octave-forge and found the
following for the dispatch function but don't know what it means.
dispatch('f','name','type')
Replaces the symbol for the name f with a dispatch
function so that if f is called with the first argument
of the given type, then all arguments are passed to
the named alternative function instead.
dispatch('f','type')
Clear dispatch function associated with the given type
dispatch('f')
List dispatch functions
I also noticed that this function is a .cc rather than .m function and it
said:
2001-11-20 Paul Kienzle
* bring various bits of ov-builtin, ov-fcn, symtab, variables together
to create this new file containing the new octave_dispatch type.
Is there an explanation that a beginner could understand and that's
certainly what I feel like when I read the above.
Henry
on 5/28/04 4:01 PM, Paul Kienzle at address@hidden wrote:
> Maybe the solution is to put the following function in
> octave-forge/main/miscellaneous/dispatch.m:
>
> function dispatch(name,to,given), warning("dispatch unavailable: use %s
> %s(%s)",to,name,given); end
>
> That way, if dispatch is unavailable, at least the user knows about it.
>
> For now you could put it in your ~/.octaverc file. Hopefully packages
> use the internal name internally so that they will still work without
> dispatch, but I haven't checked.
>
> Paul Kienzle
> address@hidden
>
> On May 28, 2004, at 6:21 PM, Henry F. Mollet wrote:
>
>> I found that I had all octave-forge functions on my desktop and there
>> was no
>> need to download them, e.g. rat.m. Therefore, I've added a recursive
>> path
>> using two slashes at the end and rat.m in the directory
>> /many/many/directories/octave-forge/general was *indeed found*.
>> However, my
>> Octave 2.1.46, on start-up, now complains with a dispatch error. It
>> does not
>> like the two slashes but won't do a recursive search with only one
>> slash.
>> What is the problem?
>> Henry
>>
>> GNU Octave, version 2.1.46 (powerpc-apple-darwin6.6).
>> Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 John W.
>> Eaton.
>>
>> error: `dispatch' undefined near line 2 column 1
>> error: near line 2 of file
>> `/Users/mollet/Desktop/usr/local/share/octave/2.1.55/site/m/octave-
>> forge/com
>> m//PKG_ADD'
>> error: evaluating assignment expression near line 2, column 10
>> error: near line 2 of file `/Users/mollet/.octaverc'
>>
>> octave:1> path
>> LOADPATH contains the following directories:
>> /sw/share/doc/octave/examples
>> /Users/mollet/CandO/epstk2
>>
>> /Users/mollet/Desktop/usr/local/share/octave/2.1.55/site/m/octave-
>> forge//
>>
>> octave:2> x=rand
>> x = 0.38021
>> octave:3> [n,d]=rat(x)
>> n = 73
>> d = 192
>>
>> [~] tcsh:29> vi .octaverc
>> 1 %% My octaverc
>> 2 LOADPATH = [LOADPATH,
>> ":/sw/share/doc/octave/examples:/Users/mollet/CandO/epstk2:/User
>> s/mollet/Desktop/usr/local/share/octave/2.1.55/site/m/octave-forge//"];
>>
>> N.B. I believe that the first ":" is a default path which was supplied
>> when
>> using Fink for the installation of Octave and must include /sw/bin, the
>> location of "octave", alias for the octave-2.1.46 application, so that
>> my
>> octave application will get loaded when I type "octave" at the shell
>> prompt.
>>
>>
>>
>> -------------------------------------------------------------
>> Octave is freely available under the terms of the GNU GPL.
>>
>> Octave's home on the web: http://www.octave.org
>> How to fund new projects: http://www.octave.org/funding.html
>> Subscription information: http://www.octave.org/archive.html
>> -------------------------------------------------------------
>>
>
>
>
> -------------------------------------------------------------
> Octave is freely available under the terms of the GNU GPL.
>
> Octave's home on the web: http://www.octave.org
> How to fund new projects: http://www.octave.org/funding.html
> Subscription information: http://www.octave.org/archive.html
> -------------------------------------------------------------
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------