What is the difference between the [list] and [pack] objects?
Up to Table of Contents
What is the difference between the [list] and [pack] objects? Which is the best to use if I want to generate a [X Y( message ?
[pack]creates a compound list from input atoms of a preset type (symbolfloatorpointer).[list]creates (appends) a compound list from two inputlists(these could be afloatsorsymbolsbecause[list]will a convert these input elements to lists automatically).[list]itself is not really an object but a wrapper for[list append], the list family is made up of![list append],[list prepend],[list split],[list trim]and[list length]
So, for two input floats there is no matter which to use?
If you are using floats it is best practice to use [pack], as it has type recognition and will output errors if a foreign type tries to get calculated. And of course [pack] can handle more than two inputs..