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

Home » Public Forums » archive » string conversion & integer
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
string conversion & integer [message #56645] Thu, 08 November 2007 09:16
rkombiyil is currently offline  rkombiyil
Messages: 59
Registered: March 2006
Member
Okay folks, I am sure this has been discussed many times already.
Maybe trivial/silly... Anyway, to make sure:

Problem:
------------
> print,where(X.dd eq dd_d)
-1
I think it's got to do with internal representation:

dd_d is originally read in as "string", for ease of concatenation and
constructing filename, along with year and month etc. Say, for
example, as '07'

But field "dd" in X.dd is defined in the format statement as:
dd:0L , say for example, from 1 to 10.
So there is a type mismatch. I tried:

> print, where(X.dd eq fix(dd_d,type=3)
-1
> print, where(X.dd eq long(dd_d))
-1

No luck. Is there a way out "other than defining dd_d as long
originally and make excessive use of string/strtrim/strmid etc while
constructing filenames?

TIA,
/r
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: SYLK files <--> IDL structure?
Next Topic: Re: ENVI Classification Image to ROIs

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

Current Time: Wed Oct 08 19:49:31 PDT 2025

Total time taken to generate the page: 0.00654 seconds