[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #49496] syntax error
From: |
Mike Miller |
Subject: |
[Octave-bug-tracker] [bug #49496] syntax error |
Date: |
Mon, 31 Oct 2016 23:02:04 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0 |
Update of bug #49496 (project octave):
Status: None => Invalid
Open/Closed: Open => Closed
_______________________________________________________
Follow-up Comment #1:
This is not a bug, this is the usual confusion about spaces within an array
literal.
When you create an array, any whitespace is treated as a separator between
elements. Your example
## this:
>> [min ([1 2 3])]
error: ...
## is the same as this:
>> [min, ([1 2 3])]
error: ...
## which is also the same as this
>> [min(), ([1 2 3])]
error: ...
This can't be fixed, you just have to remember to omit spaces when calling a
function inside of an array context like this, or surround the entire thing
with parentheses
>> [(min ([1 2 3]))]
ans = 1
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?49496>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/