Dumb problem with STRPOS [message #4738] |
Fri, 14 July 1995 00:00  |
steele
Messages: 5 Registered: March 1994
|
Junior Member |
|
|
Can someone explain the following behaviour to me?
IDL> help,/st,!version ; Here's the situation.
** Structure !VERSION, 3 tags, length=24:
ARCH STRING 'mipseb'
OS STRING 'RISC/os'
RELEASE STRING '3.1.0'
IDL> test='c000.' ; define a string
IDL> help,test ; check it is a string
TEST STRING = 'c000.'
IDL> print,strpos(test,'000') ; search for a substring
1
IDL> print,strpos(test,'000.') ; and a slightly different one
1
IDL> test='c0000.' ; add a '0'
IDL> help,test
TEST STRING = 'c0000.'
IDL> print,strpos(test,'000') ; search again
1
IDL> print,strpos(test,'000.') ; Why isn't this substring found???
-1
I checked the manual for this version and it says nothing that would
explain this. BTW, it's nothing to do with octal constants.
All suggestions gratefully received!
Dave
--
David Steele | Internet : steele@aragorn.phys.ucalgary.ca
Dept. of Physics and Astronomy | SPAN : CANCAL::STEELE
The University of Calgary | Phone : +1 403 220 8651
OPINIONS EXPRESSED WITHIN ARE MY OWN AND NOT THOSE OF THE UNIVERSITY OF CALGARY
|
|
|