|
From: | Piotr Held |
Subject: | [Octave-bug-tracker] [bug #51659] Calling 'methods' on self causes syntax error |
Date: | Fri, 4 Aug 2017 13:57:31 -0400 (EDT) |
User-agent: | Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36 |
URL: <http://savannah.gnu.org/bugs/?51659> Summary: Calling 'methods' on self causes syntax error Project: GNU Octave Submitted by: jsoh425 Submitted on: Fri 04 Aug 2017 05:57:30 PM UTC Category: Octave Function Severity: 3 - Normal Priority: 5 - Normal Item Group: Matlab Compatibility Status: None Assigned to: None Originator Name: Piotr Held Originator Email: Open/Closed: Open Discussion Lock: Any Release: dev Operating System: Any _______________________________________________________ Details: When calling methods on self the interpreter calls a syntax error. Which kind of makes sense since it hasn't yet interpreted the whole class yet, however Matlab lets you do this. Let me give an example. Consider the following code: classdef test_methods <handle methods function tst1 (self) methodNames = methods (self); end end end %!test %! a = test_methods; %! a.tst1(); When calling 'test test_methods' the interpreter responds with: parse error near line 6 of file [...]/test_methods.m syntax error >>> m = methods (self); I will upload this as a file as well. _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Fri 04 Aug 2017 05:57:30 PM UTC Name: test_methods.m Size: 162B By: jsoh425 <http://savannah.gnu.org/bugs/download.php?file_id=41413> _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?51659> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |