help-octave
[Top][All Lists]
Advanced

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

Re: How to wrap "lighting phong;" with a mock funtion?


From: Carlo de Falco
Subject: Re: How to wrap "lighting phong;" with a mock funtion?
Date: Mon, 14 May 2007 15:55:33 +0200


On 14/mag/07, at 15:38, Andreas Romeyke wrote:

But how can I write a mock for "lighting", so that the line described

on top will not fail in Octave 2.9.x?


probably you can use 
mark_as_command:

>> type lighting
lighting is the user-defined function defined from: /Users/carlo/Desktop/WDIR/lighting.m

function ret = lighting (varargin)
ret = 1;
disp(" <--- lighting")

>> lighting phong
parse error:

  syntax error

>>> lighting phong
                 ^


>> mark_as_command ("lighting")
>> lighting phong
<--- lighting
ans =  1

I hope this is what you meant.
c.

reply via email to

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