Forums > Dev

2D array ?

November 28, 2012 | 10:49 am

Hello,

Inside all C Max objects’ source files I have opened I see no use of ANSI C arrays. Everyone seems to use atoms instead. However, which datatype/structure should one use for 2D arrays ?

Any example would be highly appreciated.

Thank you in advance.


November 28, 2012 | 1:20 pm

Merci Nicolas. Actually yes I have opened the SDK and third-party sources but maybe I expected the arrays in the wrong place. I thought they’d be in the typedef struct definitions and I couldn’t find any in there. Nevertheless I expected to encounter more of them globally. I don’t get where to use regular arrays and where to use atomarrays. At first I thought atomarrays were specifically for symbols but it seems to be used for numbers too.

It’s hard to be a beginner in C and a beginner in Max external programming simultaneously. Still a long way to go !


November 28, 2012 | 4:10 pm

"At first I thought atomarrays were specifically for symbols but it seems to be used for numbers too."
as I understand it:
Atoms are used to provide a "typeless" passing interface to Max calls: they hold "a thing" ("an atom"), which is unitary data of some type. So, they can be symbols or numbers (float or int) …you should code to test the type before dealing with the atom.
as i foggily recall, waiting for the insanely diffcult subrogation query to complete.


Viewing 3 posts - 1 through 3 (of 3 total)