[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #64674] VM Add support for scripts
From: |
Arun Giridhar |
Subject: |
[Octave-bug-tracker] [bug #64674] VM Add support for scripts |
Date: |
Tue, 19 Sep 2023 10:40:34 -0400 (EDT) |
Update of bug #64674 (project octave):
Status: Ready For Test => In Progress
_______________________________________________________
Follow-up Comment #2:
There's a problem with this patch, bisected to hg id 56acd8f390f8. It causes
`whos` to print its results twice.
Test: create the following two files foofun.m and fooscript.m:
$ cat foofun.m
function foofun
a = 1;
b = 2;
whos
endfunction
$ cat fooscript.m
c = 3;
d = 4;
whos
Then call them from Octave. The function works correctly:
octave:1> foofun
Variables visible from the current scope:
variables in scope: foofun: /tmp/foofun.m
Attr Name Size Bytes Class
==== ==== ==== ===== =====
a 1x1 8 double
b 1x1 8 double
Total is 2 elements using 16 bytes
But the script prints the output of `whos` twice, once in "script scope" and
once in "top scope":
octave:2> fooscript
Variables visible from the current scope:
variables in scope: /tmp/fooscript.m
Attr Name Size Bytes Class
==== ==== ==== ===== =====
c 1x1 8 double
d 1x1 8 double
Total is 2 elements using 16 bytes
variables in scope: top scope
Attr Name Size Bytes Class
==== ==== ==== ===== =====
c 1x1 8 double
d 1x1 8 double
Total is 2 elements using 16 bytes
The hg id just before this patch works properly, but that doesn't have VM
support for scripts.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?64674>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/