[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #45967] More consistent error message style fo
From: |
Mike Miller |
Subject: |
[Octave-bug-tracker] [bug #45967] More consistent error message style for parse errors |
Date: |
Tue, 15 Sep 2015 02:10:36 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.2.1 |
Update of bug #45967 (project octave):
Category: None => Interpreter
Severity: 3 - Normal => 1 - Wish
Item Group: None => Feature Request
Status: None => Need Info
_______________________________________________________
Follow-up Comment #1:
This is interesting. My first instinct is to say that they are really two
different kinds of errors, but I realized that command syntax allows
"sentences" like the first example to work just fine. Maybe "i" is a special
case in that it is both syntax and a built-in function named "i".
But compare
>> i am a bug
parse error:
syntax error
>>> i am a bug
^
>> fft am a bug
error: invalid conversion from string to real scalar
Both "i" and "fft" are built-in functions, but with "fft" it does the normal
conversion from command to function call, and the error is different.
Perhaps it is a bug that "i am a bug" is flagged as a syntax error rather than
an invalid function call to the function named "i", but that's about it.
If your function were
function f ()
1 +
endfunction
the same "parse error" would be thrown, because it is illegal syntax, not just
an invalid function call or reference to an unknown variable.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?45967>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/