[Thread Prev][Thread Next][Index]

Re: [ferret_users] concatenating strings with integers



Hi Andrew,

Le 2015-09-18 Andrew a écrit:
> A workaround would be to simply truncate the final "." from the result
> of FLOATSTR():
> 
>   NOAA/PMEL TMAP
>   FERRET v6.95 (rc3)
>   Linux 2.6.32-573.3.1.el6.x86_64 64-bit - 09/15/15
>   18-Sep-15 12:26
> 
> yes? let First = { "one", "two", "three" }
> yes? let Second= { 1, 2, 3 }
> yes? let f = floatstr(Second,"(f0.0)")
> yes? let n = strlen(f)
> yes? let Third = First + substring(f, 1, n-1)

Thank you, this works.  It is a good work-around.

It's functionally the same as Paulo's outside-the-loop answer.

Of course, an IntegerStr() function would be ideal.

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