What object can contain an **Int**(32) and two **inline** **proc**s

I have 6 objects, each of which contains an int(32) and two procs, where each of those two are to be Inlined code.

What data structure should I use for this, a record or a class and are there any examples of something similar anywhere?

Ta.

Sorted. Just used a module of modules.

1 Like

Hi Damian —

If you only need a single instance of the object, I think a module is a good choice. Just for reference in case others read this in the future, I tend to prefer records whenever they'll get the job done, where When should I use a Record vs a Class in Chapel - Stack Overflow is a good reference for the distinguishing characteristics of each.

-Brad

I need 5 instances and never any more. No need to copy instances. No writeable elements. It is more of a namespace issue. My choice of module seems to work. Thanks for confirming my choice. Interesting Stack Overflow article.

Makes sense. For a "namespace" type of issue, I agree modules are what you want.

-Brad