octave-maintainers
[Top][All Lists]
Advanced

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

Re: Reformatting graphics demos


From: Rik
Subject: Re: Reformatting graphics demos
Date: Mon, 15 Aug 2016 20:48:51 -0400


On Mon, August 15, 2016 7:54 pm, Ben Abbott wrote:
>> On Aug 15, 2016, at 7:21 PM, John W. Eaton <address@hidden> wrote:
>>
>> I just noticed this change:
>>
>> o  changeset:   22566:1c4cd12987f5
>> |  user:        Rik <address@hidden>
>> |  date:        Mon Aug 15 15:15:30 2016 -0700
>> |  summary:     Use Octave syntax in graphics demos.
>>
>> I prefer Octave syntax as well, but I thought we used
>> Matlab-compatible syntax for those demos so it would be possible to
>> run them in Matlab and easily compare the appearance of plots.  Is
>> that no longer a goal? Sorry if I missed a discussion about this.
>>
>> jwe
>
> I also thought the agreement was to use Matlab syntax for graphics
> demos.  For example, from 3 weeks ago ;-)
>
>       http://hg.savannah.gnu.org/hgweb/octave/rev/283d8dfcad37
>
> # HG changeset patch
> # User Rik <address@hidden>
> # Date 1469030091 25200
> # Node ID 283d8dfcad373b2c11e2aa76e66a58b4a17a3dbc
> # Parent  c4901d7a2d7dcdc0a2d057748f603f06ce62731d
> Make demos Matlab compatible for comparison with dump_demos script.
>
> However, the above changeset isn?t consistent with applying Matlab
> syntax. Example, the demos often use double-quotes, which Matlab
> doesn?t support.
>
> Ben
>

The dump_demos.m script now includes a simple oct2mat converter.  It
takes care of double quotes / single quotes, comment characters ('#'
vs. '%'), and our extended end syntax (endif, endfunction, etc.). 
This allows us to write the demos in ordinary Octave syntax.  The only
thing it doesn't handle is line continuations so those have to remain.

--Rik





reply via email to

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