Page 1 of 1

Storing data

Posted: 02 Feb 2015 17:51
by Ozymandias
Hi all,

I've been browsing the past threads on this subject and attempting to get a grasp of it. I see how creating and using uninitialized singletons for storing things works, but I'm fuzzy on this where vectors are concerned. Is it possible to create an uninitialized vector, as such?

I hope that makes sense - I'm still new to this. Thanks for any help. :)

Re: Storing data

Posted: 02 Feb 2015 23:05
by Softcore
create a custom expression with your desired name.

IF you want it to be a vector, it will become one as soon as you start filling it with values - for example if your custom expression is named

C,

Then if you, in a script type:

C[5]=0;

Automatically C becomes a vector with size 6.

if you want to initially have a vector with a specific size, just fill it with zeros (unfortunatelly Lemur does not seperate "null" with 0)

For example

C=stretch(0,16);

WIll make C a vector with size 16, filled with 0s.

Re: Storing data

Posted: 03 Feb 2015 02:17
by Ozymandias
Thank you! :)