[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #51988] syntax error on command syntax in scri
From: |
Nicholas Jankowski |
Subject: |
[Octave-bug-tracker] [bug #51988] syntax error on command syntax in script file when command is shadowed by a variable |
Date: |
Wed, 27 Mar 2024 15:07:58 -0400 (EDT) |
Update of bug #51988 (group octave):
Status: Confirmed => Need Info
_______________________________________________________
Follow-up Comment #4:
can anyone confirm if this bug is still active in v9.1? I cannot recreate the
comment #1 example and i couldn't quite follow the comment #0 description to
attempt another test from that.
regarding the comment #1 example, if foo is a function I always get 'normal'
behavior. If I make it a script, I get the error
"error: variable "exist" used as function in command style expression" which
i believe is a fairly recent behavior change (octave 8 maybe?). (it seems
the output from `type foo` has changed since comment #1 was written? as it
doesn't show any function/endfunction lines, but says foo.m is a function not
a script)
script:
>> type foo
foo is the script defined from:
C:\Users\nicholas.jankowski\Desktop\workingfiles\temp\foo.m
exist x
>> clear all
>> exist = 1
exist = 1
>> foo
error: variable "exist" used as function in command style expression
error: called from
foo at line 1 column 3
>> type foo
foo is the function defined from:
C:\Users\nicholas.jankowski\Desktop\workingfiles\temp\foo.m
function foo ()
exist x
endfunction
>> clear all
>> exist = 1
exist = 1
>> foo
ans = 0
unless someone has a different example of concern, i think this bug report can
be closed.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?51988>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #51988] syntax error on command syntax in script file when command is shadowed by a variable,
Nicholas Jankowski <=
Message not available
Message not available
Message not available
Message not available