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

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

[Octave-bug-tracker] [bug #64702] VM machine has issues with shorthand a


From: anonymous
Subject: [Octave-bug-tracker] [bug #64702] VM machine has issues with shorthand assignment operators for global variables
Date: Thu, 21 Sep 2023 00:35:39 -0400 (EDT)

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

                 Summary: VM machine has issues with shorthand assignment
operators for global variables
                   Group: GNU Octave
               Submitter: None
               Submitted: Thu 21 Sep 2023 04:35:35 AM UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: dev
         Discussion Lock: Any
        Operating System: GNU/Linux
           Fixed Release: None
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Thu 21 Sep 2023 04:35:35 AM UTC By: Anonymous
VM machine has issues with shorthand and assignment operators for global
variables.
 
It throws an error
'error: can't perform indexing operations for global value reference type'.

Normal assignment does work without any issues.


script "test2.m"
------------------------------------------------

   global TT;

   sz = [5,1];
   TT = zeros(sz);
   idx = 1:3;
   TT (idx)  = TT (idx) + 5;
   disp(TT);

   printf("\n");
   TT (idx)  += 5;
   disp(TT);

--------------------------------------------------

__enable_vm_eval__ (0);
source test2.m


   5
   5
   5
   0
   0

   10
   10
   10
    0
    0


__enable_vm_eval__ (1);
source test2.m

__enable_vm_eval__ (1);
source test2.m
   5
   5
   5
   0
   0

error: can't perform indexing operations for global value reference type
error: called from
    test2.m at line 10 column 4









    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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