This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: membership test problem
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: Mike Mason <mmlnx at us dot ibm dot com>
- Cc: SystemTAP <systemtap at sources dot redhat dot com>
- Date: 26 Oct 2006 18:59:53 -0400
- Subject: Re: membership test problem
- References: <45412068.5090809@us.ibm.com>
Mike Mason <mmlnx@us.ibm.com> writes:
> What should the following code print? I expected TRUE, but got
> FALSE. Looks like if the array element value is 0, the membership
> test fails. Is this correct? [...]
Yes, Josh's explanation is correct, zero and "" are deemed to be
null/absent values for purposes of array elements. (This could change
though.)
(I could have sworn that I documented this behavior in the man page,
but now I can't find it. It is in the tutorial.)
- FChE