[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 19990325: c++ interface bug? NcFile::get_var()
- Subject: Re: 19990325: c++ interface bug? NcFile::get_var()
- Date: Thu, 25 Mar 1999 08:45:00 -0700
Ionutz,
> To: address@hidden
> From: Ionutz Borcoman <address@hidden>
> Subject: is this a bug in c++ interface ?
> Organization: .
> Keywords: 199903251256.FAA21940
In the above message, you wrote:
> My system is a Debian Linux with glibc 2.1 and egcs-2.91.63.
>
> I want to test if a certain variable exists in a NcFile *nc. I used:
> nc->get_var("xxx") function. If "xxx" really exists, I get the pointer
> to it. But if it is inexistent, then my program sigsegvs.
>
> If I use the C function nc_inq_varid, all things are dandy. Shouldn't
> NcFile::get_var(NcToken name) check if the name is valid and return a
> NULL if not valid ? Or allocate a var and return false when test it with
> is_valid().
Are you saying that your NcFile::get_var() returns a non-null pointer
for a non-existant variable? If so, then this is a bug. Can you send
us a small program that exhibits the problem?
--------
Steve Emmerson <http://www.unidata.ucar.edu>