string conversion & integer [message #56645] |
Thu, 08 November 2007 09:16 |
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
|
|
|