[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
'unset' not fully unsets function's local numeric variables
From: |
Emilio A. Lazo Z. |
Subject: |
'unset' not fully unsets function's local numeric variables |
Date: |
Sun, 7 Apr 2002 22:11:27 -0400 (VET) |
Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-redhat-linux-gnu'
-DCONF_VENDOR='redhat' -DSHELL -DHAVE_CONFIG_H -D_GNU_SOURCE
-D_FILE_OFFSET_BITS=64 -I. -I. -I./include -I./lib -I/usr/include -O2
-march=i386 -mcpu=i686
uname output: Linux magin.local.net 2.4.18-ac3 #41 Fri Apr 5 16:10:19 VET
2002 i686 unknown
Machine Type: i386-redhat-linux-gnu
Bash Version: 2.04
Patch Level: 21
Release Status: release
Description:
The builtin command 'unset' seems to not 'fully' unsets a NUMERIC
variable when it is local to a function.
More explicitly, if we declare a local variable and later we assign a
numeric value to it, after applying unset, it seems to be sucesfully
unsetted but if we perform a math operation over it (such as i=$[i+1]),
the variable is trated with its last value and the operation returns, in our
case: '2' instead of '1'
Repeat-By:
a shell script is attached
I think this is a bug and not a particular wrong behavior on my
system...right?
Bye, regards...
--
<--->
Universidad Central de Venezuela
Facultad de Ciencias
Emilio A. Lazo Z.
E-mails: elazo@bigfoot.com
elazo@tyto.ciens.ucv.ve
root@magin.homelinux.org
bashbug.sh
Description: Bourne shell script
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- 'unset' not fully unsets function's local numeric variables,
Emilio A. Lazo Z. <=