help-octave
[Top][All Lists]
Advanced

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

keyboard does not provide local context


From: Eric Chassande-Mottin
Subject: keyboard does not provide local context
Date: Fri, 20 Nov 2009 06:50:57 -0800 (PST)


using foo.m below,
if I say foo(1) from prompt I get access to local vars

octave3.2:1> foo(1)
keyboard: stopped in /home/ecm/foo.m
a =  1
debug> whos
Variables in the current scope:

  Attr Name        Size                     Bytes  Class
  ==== ====        ====                     =====  ===== 
       a           1x1                          8  double
       argn        1x1                          1  char
   f   x           1x1                          8  double

Total is 3 elements using 17 bytes

but when calling foo() from a script I don't

octave3.2:1> test
keyboard: stopped in /home/ecm/foo.m
b =  2
a =  1
debug> whos
Variables in the current scope:

  Attr Name        Size                     Bytes  Class
  ==== ====        ====                     =====  ===== 
       ans         1x30                        30  char
       b           1x1                          8  double

Total is 31 elements using 38 bytes

why is that? is there a way to access local vars when calling from a script?

I am using

GNU Octave, version 3.2.3

========   test.m    =============
b=2

foo(1)
============================

=========   foo.m ==============
function y=foo(x)

a=1
keyboard

endfunction
============================
-- 
View this message in context: 
http://old.nabble.com/keyboard-does-not-provide-local-context-tp26441995p26441995.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

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