octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #64532] version 4.2.2 exist() says variable is


From: anonymous
Subject: [Octave-bug-tracker] [bug #64532] version 4.2.2 exist() says variable is a directory
Date: Tue, 8 Aug 2023 20:32:47 -0400 (EDT)

URL:
  <https://savannah.gnu.org/bugs/?64532>

                 Summary: version 4.2.2 exist() says variable is a directory
                   Group: GNU Octave
               Submitter: None
               Submitted: Wed 09 Aug 2023 12:32:45 AM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Tim van Zon
        Originator Email: t.vanzon@prolira.com
             Open/Closed: Open
                 Release: other
         Discussion Lock: Any
        Operating System: GNU/Linux
           Fixed Release: None
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Wed 09 Aug 2023 12:32:45 AM UTC By: Anonymous
Sorry, I do not have access to a newer version than 4.2.2


code example:

thisVar = fullfile('./') % make a variable holding a [1x2] char 
c= exist(thisVar)


gives c=7 (so directory), while I expect to get c=1 as I am asking if a
variable exists.

if I do 


thisVar = fullfile('./')
c= exist(thisVar, 'var')
I get 
c=0

so it really does not think that thisVar is a variable.

so the function exist() seems to check the content of the variable? 







    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?64532>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]