segmentation fault occurs when testing strings if one string has a _FillValue assigned but the other doesn't

From: Jonathan Vigh <vigh_at_nyahnyahspammersnyahnyah>
Date: Sat Oct 17 2009 - 23:01:19 MDT

Greetings,
    I'm getting an odd segmentation fault when I compare two strings if
one string has a _FillValue assigned and the other one doesn't:

stringA = "this"
stringA@_FillValue

stringB = "that"

if (stringA .ne. stringB) then
 ... do stuff ...
end if

The segmentation fault occurs at the point of the test.

Should I expect this behavior?
I've attached a simple script that you can run to reproduce this.

Jonathan

begin

  stringA = (/"this"/)
  stringB = (/"that"/)

  print(stringA)
  print(stringB)

  if (stringA .ne. stringB) then
     print("first test: the strings differ")
  end if
 
  stringB@other_att = "this"
  stringB@_FillValue = "missing"

  print(stringA)
  print(stringB)

  if (stringA .ne. stringB) then
     print("second test: the strings differ")
  end if
  
end

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sat Oct 17 23:01:39 2009

This archive was generated by hypermail 2.1.8 : Fri Oct 23 2009 - 11:36:30 MDT