|
From: | Amro |
Subject: | [Octave-bug-tracker] [bug #49819] classdef: parse error in properties block |
Date: | Fri, 9 Dec 2016 23:00:32 +0000 (UTC) |
User-agent: | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:45.9) Gecko/20100101 Goanna/3.0 Firefox/45.9 PaleMoon/27.0.2 |
URL: <http://savannah.gnu.org/bugs/?49819> Summary: classdef: parse error in properties block Project: GNU Octave Submitted by: amro_octave Submitted on: Sat 10 Dec 2016 01:00:31 AM EET Category: Interpreter Severity: 3 - Normal Priority: 5 - Normal Item Group: Incorrect Result Status: None Assigned to: None Originator Name: Originator Email: Open/Closed: Open Discussion Lock: Any Release: 4.2.0 Operating System: Any _______________________________________________________ Details: The following class throws a syntax error in Octave 4.2.0: classdef MyClass properties x = 0 end end >> obj = MyClass parse error near line 4 of file C:\dev\MyClass.m syntax error >>> x = 0 ^ If I add a *semicolon* at the end of the line "x = 0;" then it works. MATLAB doesn't require the semicolon, and works either way: * https://www.mathworks.com/help/matlab/matlab_oop/defining-properties.html _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?49819> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |