[Date Prev ][Date Next ][Thread Prev ][Thread Next ][Date Index ][Thread Index ]
Re: [Help-bash] Arithmetic evaluation / expansion question
From :
Andy Chu
Subject :
Re: [Help-bash] Arithmetic evaluation / expansion question
Date :
Wed, 10 Oct 2018 17:04:48 -0700
> I noted in the man page that null or unset variables evaluate to zero.
> Above, pd is a defined variable which holds "abc" (a string not beginning
> with zero - non-octal)
> pd is "arithmetically" evaluated to zero. Is this as intended? I.E. can
> this behavior be relied upon?
>
In an arithmetic context, pd is evaluated identically to $pd, so yes. Just
think of it as the $ being optional.
Andy
[Help-bash] Arithmetic evaluation / expansion question , Bruce Hohl , 2018/10/10
Re: [Help-bash] Arithmetic evaluation / expansion question , Andy Chu , 2018/10/10
Re: [Help-bash] Arithmetic evaluation / expansion question , Greg Wooledge , 2018/10/10
Re: [Help-bash] Arithmetic evaluation / expansion question , Andy Chu , 2018/10/10
Re: [Help-bash] Arithmetic evaluation / expansion question , Andy Chu , 2018/10/10
Re: [Help-bash] Arithmetic evaluation / expansion question , Bruce Hohl , 2018/10/10
Re: [Help-bash] Arithmetic evaluation / expansion question ,
Andy Chu <=
Re: [Help-bash] Arithmetic evaluation / expansion question , Bruce Hohl , 2018/10/10
Re: [Help-bash] Arithmetic evaluation / expansion question , Quentin L'Hours , 2018/10/10
Re: [Help-bash] Arithmetic evaluation / expansion question , Bruce Hohl , 2018/10/10
Re: [Help-bash] Arithmetic evaluation / expansion question , Chet Ramey , 2018/10/11
Re: [Help-bash] Arithmetic evaluation / expansion question , Chet Ramey , 2018/10/11
Re: [Help-bash] Arithmetic evaluation / expansion question , Chet Ramey , 2018/10/11
Re: [Help-bash] Arithmetic evaluation / expansion question , Chet Ramey , 2018/10/11