[Top][All Lists]

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

Re: Can't define methods on a @datetime class

From: Andrew Janke
Subject: Re: Can't define methods on a @datetime class
Date: Sat, 12 Jan 2019 04:53:42 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

On 1/12/19 4:52 AM, Andreas Weber wrote:
Am 12.01.19 um 10:37 schrieb Andrew Janke:
On 1/12/19 4:11 AM, Andreas Weber wrote:
Am 12.01.19 um 08:23 schrieb Andrew Janke:
I have a basic class that defines properties and basic conversions: https://github.com/apjanke/octave-addons/blob/968429c90ac25a422dec70bdd3c25811faba92ce/Mcode/datetime.m

As far as I can see there is a end in line 96 for the switch.
Tehn display and disp are defined which causes, that they are inside function datetime

If I fix the end and remove isnan because it is implemented twice disp is called as expected.

Bingo. Thank you!

You're welcome, glad to help. If you plan to implement datetime for Octave I would suggest to use to use endfunction, endswitch, endproperties, endmethods and so on for better readability.

-- Andy

Yep, I'll switch the style over to the GNU Octave style before submitting it. I'm just not a fan of that style personally, so I'm going to keep it in Matlab style while it's under development.


reply via email to

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