[Developers] assigning to array parameters without any array subscript

Erik Schnetter schnetter at aei.mpg.de
Sat Jun 4 11:45:18 CDT 2005


On Saturday 04 June 2005 14:38, Jonathan Thornburg wrote:
> Hi,
>
> Suppose I declare an array parameter
>
>  	# param.ccl
>  	CCTK_REAL blah[10] "blah blah blah"
>  	{
>  	*:* :: "any real number:
>  	} 0.0
>
> and then try to assign it in a par file without the array index:
>
>  	# foo.par
>  	MyThorn::blah = 42.69
>
> Current-cvs Cactus appears to accept this without errors/warnings,
> and appears to assign the value to all array elements.

I'd be amazed if it did that.  I have the feeling that it assigns either 
nothing, or only to the first element of the array.

> Question:  Is this "official behavior", or an implementation
> artifact, or an implementation bug?

It is often a nuisance.

> [A related point: the Cactus Users' Guide chapter B5 "Cactus
> Parameters", where I first searched to try to find the answer to this
> question, not only doesn't say, it turns out not to mention array
> parameters at all!]

Undocumented -- then it's not official behaviour, I'd say.

-erik

-- 
Erik Schnetter <schnetter at aei.mpg.de>   http://www.aei.mpg.de/~eschnett/

My email is as private as my paper mail.  I therefore support encrypting
and signing email messages.  Get my PGP key from www.keyserver.net.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.cactuscode.org/pipermail/developers/attachments/20050604/0605e931/attachment-0002.bin 


More information about the Developers mailing list