comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Dumb problem with STRPOS
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Dumb problem with STRPOS [message #4742 is a reply to message #4738] Fri, 14 July 1995 00:00 Go to previous message
steele is currently offline  steele
Messages: 5
Registered: March 1994
Junior Member
In article <3u6g67$usi@ds2.acs.ucalgary.ca>, I wrote:
|> Can someone explain the following behaviour to me?
|> [snip]
|> 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

To add further spice:
IDL> test='c00000.' ; Add a further '0'
IDL> print,strpos(test,'000') ; Search again
1
IDL> print,strpos(test,'000.') ; This time it works!
3
IDL> test='c10000.' ; But if I add a '1' instead,
IDL> print,strpos(test,'000') ; this still works,
2
IDL> print,strpos(test,'000.') ; and this still doesn't!
-1

Does anyone have a glimmer? Anyone at RSI listening?

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
[Message index]
 
Read Message
Read Message
Previous Topic: idl programs for image segmentation & volumetric brain MRI
Next Topic: Are handles garbage collected?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 12:04:04 PDT 2025

Total time taken to generate the page: 7.12115 seconds