annotate test/bug-53027/ntest53027b.m @ 33661:4c378dd47cf2 default tip @

command-widget: Use new signal-slot syntax for better compiler diagnostics. * libgui/src/command-widget.cc (console::console): Use new signal-slot syntax for better compiler diagnostics.
author Markus Mützel <markus.muetzel@gmx.de>
date Wed, 12 Jun 2024 17:24:20 +0200
parents c16ad80274c9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
24977
2b040946dc69 improve handling of clear for globals, forwarded symbols (bug #53027)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
1 function [m_exist, n_exist] = ntest53027b ()
2b040946dc69 improve handling of clear for globals, forwarded symbols (bug #53027)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
2 global x
2b040946dc69 improve handling of clear for globals, forwarded symbols (bug #53027)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
3 x = 3;
2b040946dc69 improve handling of clear for globals, forwarded symbols (bug #53027)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
4 n_exist = nest ();
2b040946dc69 improve handling of clear for globals, forwarded symbols (bug #53027)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
5 m_exist = exist ("x", 'var');
2b040946dc69 improve handling of clear for globals, forwarded symbols (bug #53027)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
6 function n_exist = nest ()
2b040946dc69 improve handling of clear for globals, forwarded symbols (bug #53027)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
7 ## The clear statement should operate on the variable in the
2b040946dc69 improve handling of clear for globals, forwarded symbols (bug #53027)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
8 ## parent scope even though there is no explicit varabiable
24982
c16ad80274c9 improve previous fix for clear in nested scopes (bug #53027)
John W. Eaton <jwe@octave.org>
parents: 24977
diff changeset
9 ## reference in the code (the clear function just sees a string
24977
2b040946dc69 improve handling of clear for globals, forwarded symbols (bug #53027)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
10 ## containing the name of the variable and the parser (correctly)
2b040946dc69 improve handling of clear for globals, forwarded symbols (bug #53027)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
11 ## does not treat this as a special case.
2b040946dc69 improve handling of clear for globals, forwarded symbols (bug #53027)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
12 clear x
2b040946dc69 improve handling of clear for globals, forwarded symbols (bug #53027)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
13 n_exist = exist ("x", "var");
2b040946dc69 improve handling of clear for globals, forwarded symbols (bug #53027)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
14 endfunction
2b040946dc69 improve handling of clear for globals, forwarded symbols (bug #53027)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
15 endfunction