[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Odd string/index problem



Can someone explain this to me:

wmc> a='stoat'
wmc> print,a([0]),'>'
stoat
>
wmc> print,a(0),'>'
stoat>     

This irritation surfaced when I tried to do
i=where(strings eq somestring)
print,strings(i)

which needs to be
i=i[0]
print,strings(i)

but why?

-W.

-- 
William M Connolley | wmc@bas.ac.uk | http://www.nerc-bas.ac.uk/icd/wmc/
Climate Modeller, British Antarctic Survey | Disclaimer: I speak for myself