My approach. The core is the engine. - page 8

 
Реter Konow:

Add a number to the array using ArrayResize on each transaction, and write the properties of the transaction to it.

I.e. for a predetermined number of elements we use this:

#define  All_objects     30
#define  All_properties  10

And to create elements dynamically, we use ArrayResize. Right?

 
I'll continue in a little while. For now, you can ask questions.
 
Vasiliy Sokolov:

I.e. for predefined number of elements we use this:

And to create elements dynamically, we use ArrayResize. Right?

Right. In case of graph interface, the number of objects is calculated at kernel stage, when the constructor file is read. In your case, the number of objects (transaction is also a kernel object), is unknown. So, the kernel should be dynamic. Its size must change.

(I need to do the same when creating a vis. studio, where user adds objects to kernel without re-initialization).

 
Реter Konow:

Correct. In the case of the graphical interface, the number of objects is counted at kernel construction stage, when the constructor file is read. In your case, the number of objects (transaction is also a kernel object), is unknown. So, the kernel should be dynamic. Its size must change.

(I need to do the same when I create a vis. studio, where user adds objects to kernel without re-initialization).

And if I always use ArrayResize instead of

#define  All_objects     30
#define  All_properties  10

Will it be an error?

 
 
Vasiliy Sokolov:

What if I always use ArrayResize instead of

Would that be a mistake?

No. This was just a simplified example. However, in a two-dimensional Kernel, the number of object properties must be known in advance.

 
Nikolai Semko:

Man is just another of Nature's bicycles. Genetically, he is only three per cent different from an ape. However, you don't confuse the two.

 
Реter Konow:

No. That was just a simplified example. However, in a two-dimensional Kernel, the number of object properties must be known in advance.

Please clarify, what do you mean by "known in advance"? That each item has a predefined number of properties , or that each of these properties must be set by the user?

 
Couldn't get past it again :) Sorry.
There was a "shot above the leg" recently, I think there's definitely a shot to the head here.
The topic-starter learned what arrays are and learned the world, and what will happen when he learns about lists ...
The world will turn upside down and there will be new horizons.
 
Vasiliy Sokolov:

Please clarify what you mean by "predefined"? That each element has a predefined number of properties , or that each of these properties must be set by the user?

Once you've set a number of properties for an object, you can't change it. If you change it, you will be out of the array.

You have to know all the properties of your objects beforehand. Give them indices. And all of them must fit in the row of the Kernel.

But, the Kernel can be dynamic, and you can change the number of Items and Objects in it. For this, use ArrayResize.

Reason: