comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: Re: Dumb problem with STRPOS

Re: Dumb problem with STRPOS
type: item
description: David, Nice bug! Also does it on VAX VMS 3.6.1c. IDL: Robust system, NOT! Paul Probert University of Wisconsin
creator: Paul Probert
date: 1995-07-15T07:00:00-00:00

Re: Dumb problem with STRPOS
type: item
description: In article usi@ds2.acs.ucalgary.ca, steele@aragorn.phys.ucalgary.ca (Dave Steele) writes: > 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 Well, this bug goes back to the original code because it's in the latest version of PV-Wave as well: WAVE> info,/st,!version ** Structure !VERSION, 4 tags, 32 length: ARCH STRING 'sparc' OS STRING 'sunos' RELEASE STRING '4.20' PLATFORM STRING 'sun4' WAVE> test='c000.' WAVE> info, test TEST STRING = 'c000.' WAVE> print,strpos(test,'000') 1 WAVE> print,strpos(test,'000.') 1 WAVE> print,strpos(test,'000.') 1 WAVE> test='c0000.' WAVE> info, test TEST STRING = 'c0000.' WAVE> print,strpos(test,'000') 1 WAVE> print,strpos(test,'000.') -1 Sorry, I can't bring any joy for PV-Wave users either. Matthew ____________________________________________________________ ______________ Matthew Larkum Physiologisches Institut Buehlplatz 5, CH-3012 Bern Switzerland Ph. 41 31 631 8726 Fax. 41 31 631 4611 Internet: larkum@pyl.unibe.ch matthewl@cortex.physiol.su.OZ.AU
creator: larkum
date: 1995-07-17T07:00:00-00:00