Storing data

Discuss Lemur and share techniques.
Post Reply
Ozymandias
Newbie
Posts: 18
Joined: 18 Nov 2014 17:47

Storing data

Post 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. :)
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: Storing data

Post 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.
Last edited by Softcore on 03 Feb 2015 07:53, edited 1 time in total.
Ozymandias
Newbie
Posts: 18
Joined: 18 Nov 2014 17:47

Re: Storing data

Post by Ozymandias »

Thank you! :)
Post Reply