From bug-request at octave dot org Fri Dec 17 07:47:56 2004 Subject: bug in Global directive From: Peter JENSEN To: bug at octave dot org Date: Fri, 17 Dec 2004 07:46:52 -0600 ## The global directive is described on ## page 60 in JWE's book. From the example ## it looks like the global directive can ## take several arguments. The parser accepts ## this however the second variable is not ## accepted as global ## I am running 2.1.58 on RH linux. ## I see the following error message ## octave:1> bug ## x = 1 ## y = 2 ## error: `y' undefined near line 22 column 12 ## error: called from `print_xy_fail' ## error: near line 38 of file `/home/ukpj/octave/saic/sim_levels/bug.m' 1 ; function print_xy_fail() global x,y ; x y endfunction function print_xy_ok() global x ; global y ; x y endfunction global x = 1 ; global y = 2 ; print_xy_ok() ; print_xy_fail() ; -- Peter Kabell Jensen E-mail : peterjensen at agere dot com Agere Systems Tel : +44 (0) 1344 86 5849 Microelectronics House Fax : +44 (0) 1344 86 5990 Kings Ride, Ascot, SL5 8AD England ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------