[Thread Prev][Thread Next][Index]

[ferret_users] assign value to array element [was: concatenating strings with integers]



Hi Ferret users,

I wanted to apply Paulo's xsequence/repeat solution on string-integer
concatenation (to another problem that I will report on in a different
post), but I found a problem.

Le 2015-09-18 Paulo a écrit:
> let First = xsequence({ "one", "two", "three" })
> let Second= xsequence({ 1, 2, 3 })
> 
> repeat/i=1:`First,ret=iend` ( let Third = "`First`_`Second,zf=2`" )

We want Third to be an array, but it will be a scalar here, having the
value of the last iteration.  How can one force Third to be an array,
and the assignment to be one to the i'th array element?

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