Retrieving elements of function returns [message #41817] |
Thu, 25 November 2004 02:37 |
Ben Panter
Messages: 102 Registered: July 2003
|
Senior Member |
|
|
Hello All,
Bit of an odd request this. I've recently found that I can take the
nth element of a returned array by enlosing the function in brackets and
then appending an array subscript:
n_pix=(size(grid))[1]
which is a bit neater than
n_pix=size(grid)
n_pix=n_pix[1]
I've had a look though the online help, and I can't decide if this is a
reasonable thing to do or not -- primarily I'm concerned that this is
some sort of undocumented feature which may disappear in later versions.
Can someone reassure me that it's ok?!
Cheers,
Ben
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Ben Panter, Garching, Germany
email via www.benpanter.co.uk
|
|
|