Note-This is a former article by Dan Cook. In case you haven't noticed, DEC Stuff is Dan Cook!

Below are detailed instructions on how an array works.

When you setup an array

Try double clicking on the array object. A menu appears. This is where you will setup what your array looks like.

But first, you need to know, what an array is. An array is much like a data table:

Image

Ok. Now in this case, when the menu pops up you would select X=4, Y=3.

The table(or array) is either a numerical or text array(which can be specified by double clicking on the array object. The array will store text, or numbers in each cell(or blank white space). And you can save them. Leave your applicatoin, and then load them again. )

Ok, now lets pretend that table, is an array object. And your program is a phone book. Now lets pretend you want to be able to seperate pages...It would be a pain to create several arrays, and switch back and fourth retrieving information from one another....The array object is more than just a data table. It is 3D in the sense that you can store information on multiple layers. Basically what this means is that each layer(or Z axis) could be a page of your phonebook. And you could store the names and addresses of your friends within this phonebook.(And the numbers in a seperate array).

Using your array
Okay, now we need to learn how to utilize this plug-in. Below is a list of what it can be used for.

-It can be used as an ini, but is a little trickier.-
-It can be used as a storage place(like a phonebook).-
-It can be used as a temporary holding place for information(such as values or text)-

Now I will discuss the actions, and how to use them.
To do this, you should follow the example.

1.)Create a new array object. Set it to a text array.
2.)Create a string object.
3.)Go into the events editor, and right click NEW CONDITION. Make the event upon pressing spacebar.
4.)In the events under the array object insert WRITE STRING TO X. insert the textyeah and hit enter. Now hit F8.

The text will be inserted in the first dimension of your array when you push space.:

Image

This is a graphical version of your array.

(Retrieving the data will come later on...)

XY table

Suppose you wanted to do the same thing except with XY dimensions...

(This continues from beforehand...so you might get stuck if you haven't done the first part.)

Now select upon pressing CTRL write string to XY. Write no in the first box. 1 in the second. And 2 in the third.

The first is always the string you want to write.

The 2nd is the X dimension
The 3rd is the Y dimension.
The 4th is the Z dimension.

Your table would look like this if you could view it(Ill get to that later).

Image

XYZ
XYZ is the same as XY, or X, but with multiple pages. Meaning it's like a book of tables...You can flip through date tables.

Other Writing information
You can write values(numbers) and retrieve them to be saved. As well as text. You can also write to a current position(Meaning you write, were an invisible cursor is). I will explain changing the current position next.

Changing the current position

This is quiteself-explanatory, once I explain the first one.

You can either change the current X position(Set the invisible cursor to a selected X position box.) And do the same with Y, and z. You can also add 1 to it each time, which makes it easy to make phone number lists and things of that sort.

Before I explain Saving, and Loading, I must explain the crucial part....Retrieving information.

Retrieving information
The array object is invisible. You can't see it. Therefore it might be a good idea to plan out what you want to put on it using a data table.

Because it is invisible, you will need to retrieve it's information using other objects. I use the String object the most, and I suggest you do also.

Lets go back to that string object you created(if you haven't, do so). Now make a new event...Upon pressing enter. Then go under the string object and select SET ALTERABLE STRING.

Under that select, RETRIEVE DATA FROM OTHER OBJECT. Goto the array, and right click it. Now select READ VALUE FROM XY position(or if you are making an XYZ, or just X...select your type.)

You should get something like this:

StrAtXY( Array, > Enter value here <, > Enter value here < )

The <, and > keys, should be erased, and the spaces kept in between the {, and }.

Insert from where you want to take the date. For this example insert.

StrAtXY( Array, 1, 1 )
And do the same action(except with a different key-Like SHIFT, instead of CTRL., and insert
StrAtXY( Array, 1, 2 )



Now run your application and press SPACE, and then CTRL. As you can see your string was set to YEAH.

Now press SHIFT. The string is set to what data was left in the arrays boxes.

Saving, and Loading

Usually when I save an array I will insert the following. You need to click expression first.(I think you need Fusion 1.5 too.

Appdrive + Appdir$+MyArrayFile

But you can also insert it using a filename selector. And, you can also save it using the FILENAMES manu within the SPECIAL Conditions area by clicking RETRIEVE DATA FROM ANOTHER OBJECT after you have clicked expression, which proceeds clicking SAVE FILE AS, and EXPRESSION.

Loading
Set an action, if you want to load a file automatically(without user input), hit LOAD ARRAY FROM FILE, and copy what you wrote before. In this case, that would be:

Appdir$+MyArrayFile

Press space, and ctrl. The same thing will happen!...

Okay, not as hard as it seems. If this doesn't help you a lot, then at least it will get you started on learning it yourself.

Image


<a href=http://www.freewebs.com/decstuff>DEC Stuff</a>