[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Synonym
From: |
John W. Eaton |
Subject: |
Re: Synonym |
Date: |
Wed, 8 Apr 2020 09:20:01 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 |
On 4/8/20 7:35 AM, Ian McCallion wrote:
What is the right syntax for providing a function which does nothing
except call another function with the same parameters and returns the
same values back.
The function below passes the parameters through, but getting returned
values back does not work. I've tried various incantations without success
function [varargout] = short(varargin)
varargout = verylongame(varargin){:})
endfunction
Try
function varargout = short (varargin)
varargout = cell (nargout, 1);
[varargout{:}] = verylongname (varargin{:});
endfunction
Then verylongname will see the same value for nargout that short does
when it is called. There are some forwarding functions like this in
Octave. For example, bar.m and barh.m both forward to an internal
function private/__bar__.m.
jwe
Re: Synonym,
John W. Eaton <=
- Re: Synonym, Ian McCallion, 2020/04/08
- Re: Synonym, Doug Stewart, 2020/04/08
- Re: Synonym, Markus Mützel, 2020/04/08
- Re: Synonym, John W. Eaton, 2020/04/08
- Re: Synonym, Tony Richardson, 2020/04/08
- Re: Synonym, John W. Eaton, 2020/04/08
- Re: Synonym, Thomas D. Dean, 2020/04/08
- Re: Synonym, Kai Torben Ohlhus, 2020/04/09
- Re: Synonym, Thomas D. Dean, 2020/04/09
Re: Synonym, Markus Mützel, 2020/04/08