[PD] Definition of "scalar" in data structures

David Powers cyborgk at gmail.com
Wed Aug 23 21:26:03 CEST 2006


Hello, maybe this is a dumb question, BUT one thing that has always
confused me, in trying to learn data structures, is the definition of
the term "scalar". I never learned this term in any computer
programming before. Anyway, here is how wikipedia defines it:

"In computing, a scalar is a variable or field that can hold only one
value at a time; as opposed to composite variables like array, list,
record, etc.. In some contexts, a scalar value may be understood to be
numeric. A scalar data type is the type of a scalar variable. For
example, char, int, float, and double are the most common scalar data
types in the C programming language."

Ok, so far so good. Except, as far as I can tell, a "scalar" in PD is
a composite variable, right?  If I make [struct structure_01 float x
float y float k] there are three variables there, not one. Am I
missing something?

As far as I can tell, a scalar is to a PD structure, as an instance is
to a class definition in OOP. Is that right or way off?

Appreciate your comments on this. Thanks!

~David




More information about the Pd-list mailing list