[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
readonly variables
From: |
ANDONE Mures |
Subject: |
readonly variables |
Date: |
Tue, 8 Apr 2003 14:22:43 +0300 |
Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu'
-DCONF_VENDOR='pc' -DSHELL -DHAVE_CONFIG_H -D_GNU_SOURCE -I. -I. -I./include
-I./lib -O2 -march=i386 -mcpu=i686
uname output: Linux fenrir.info.uaic.ro 2.4.19-bbp10-2 #3 SMP Thu Mar 6
08:35:48 EET 2003 i686 unknown
Machine Type: i686-pc-linux-gnu
Bash Version: 2.05a
Patch Level: 0
Release Status: release
Description:
removing the "readonly" flag of a variable does not work!
Repeat-By:
declare -r VAR="10"
echo $VAR #outputs "10"
readonly -n VAR #silently does nothing
echo $VAR #outputs "10", as expected
VAR=11 #ERROR!!!! VAR : readonly variable!! WHY???
declare +r VAR #The same ERROR!!! VAR: readonly variable...
WHY ??????
- readonly variables,
ANDONE Mures <=