[Thread Prev][Thread Next][Index]
[ferret_users] concatenating strings with integers
Dear Ferret users,
I'd like to concatenate an array of strings and an array of integers
(that should be converted to strings). Now I have:
let First = { "one", "two", "three" }
let Second= { 1, 2, 3 }
let Third = First + Second
That doesn't work, since the elements of Second must be converted to
strings, e.g.:
let Third = First + FloatStr(Second, "(f0.0)")
yes? list Third
VARIABLE : FIRST + FLOATSTR(SECOND, "(f0.0)")
SUBSET : 3 points (X)
1 / 1:"one1."
2 / 2:"two2."
3 / 3:"three3."
Not quite. I do not want the colon. Of course, I shouldn't have used
FloatStr(). I rather need a string to *integer* function, but I think
that Ferret does not have that.
Of course I could do anything by spawning awk(1), but a native Ferret
solution would be more neat.
I guess this is a feature request: and IntStr() function.
Marco
--
Laboratoire des Sciences du Climat et l'Environnement (LSCE)
Tel: +33 1 6908 3876
Www: http://www.lsce.ipsl.fr/Pisp/marco.van-hulten/
Consider liberating your papers and data -- https://creativecommons.org/
[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce /
NOAA /
OAR /
PMEL /
Ferret
Privacy Policy | Disclaimer | Accessibility Statement