[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #64705] VM machine executed script clear the c
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #64705] VM machine executed script clear the content of a global pre-declared global variable |
Date: |
Thu, 5 Oct 2023 01:01:30 -0400 (EDT) |
Follow-up Comment #6, bug #64705 (project octave):
Does not work fully and status should be reverted.
Not working use case:
The global variables are defined in a script. Actually the script is just a
code snippet, which conveniently defines all global variables.
Via this code snippet the global variables can be accessed in all functions
using these global variables.
Snippet_GlobalVars.m
global x1;
global x2;
global x3;
global x4;
Example function accessing these globals
function ret = I_Use_Globals()
run ("Snippet_GlobalVars.m");
disp(x1);
ret = x1
endfunction
then testing
__vm_enable__(0);
run ("Snippet_GlobalVars.m");
x1 = 1;
I_Use_Globals();
works find and displays x1 = 1.
__vm_enable__(1);
run ("Snippet_GlobalVars.m");
x1 = 1;
I_Use_Globals();
results in
error: VM internal error: Trying to make unnamed symbol global
error: called from
Snippet_GlobalVars at line 3 column 1
run at line 93 column 5
I_Use_Globals at line 2 column 3
Note: When instead of using the code snippet the global variables are declared
directly, it works without error.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?64705>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #64705] VM machine executed script clear the content of a global pre-declared global variable, Arun Giridhar, 2023/10/04
- [Octave-bug-tracker] [bug #64705] VM machine executed script clear the content of a global pre-declared global variable,
anonymous <=
- Message not available
- [Octave-bug-tracker] [bug #64705] VM machine executed script clear the content of a global pre-declared global variable, Arun Giridhar, 2023/10/05
- [Octave-bug-tracker] [bug #64705] VM machine executed script clear the content of a global pre-declared global variable, Arun Giridhar, 2023/10/05
- [Octave-bug-tracker] [bug #64705] VM machine executed script clear the content of a global pre-declared global variable, Arun Giridhar, 2023/10/05
- [Octave-bug-tracker] [bug #64705] VM machine executed script clear the content of a global pre-declared global variable, Arun Giridhar, 2023/10/06
- [Octave-bug-tracker] [bug #64705] VM machine executed script clear the content of a global pre-declared global variable, anonymous, 2023/10/06
- Message not available
- [Octave-bug-tracker] [bug #64705] VM machine executed script clear the content of a global pre-declared global variable, Arun Giridhar, 2023/10/06
- [Octave-bug-tracker] [bug #64705] VM variable scope problems when executing scripts, Arun Giridhar, 2023/10/06
- [Octave-bug-tracker] [bug #64705] VM variable scope problems when executing scripts, Petter, 2023/10/06
- [Octave-bug-tracker] [bug #64705] VM variable scope problems when executing scripts, Petter, 2023/10/07
- [Octave-bug-tracker] [bug #64705] VM variable scope problems when executing scripts, Arun Giridhar, 2023/10/07