On some sites I have found that void
is a scalar type:
https://ee.hawaii.edu/~tep/EE160/Book/chap5/section2.1.3.html
http://herbert.the-little-red-haired-girl.org/en/prgmsc1/docs/part2a.pdf
https://www.zentut.com/c-tutorial/c-data-types/
Other sites contain no information about this:
https://www.sqa.org.uk/e-learning/LinkedDS01CD/page_03.htm
https://i.stack.imgur.com/tFDt3.png
Is void
a scalar type or not?
The five scalar data types are numeric, character, integer, logical, and complex.
Scalar Types Data objects in C++ can be categorized as either scalar (e.g. integers and pointers) or non- scalar (e.g. arrays and classes), where scalars are primitive objects which contain a single value and are not composed of other C++ objects.
Scalar objects are used for singular variables that are not part of a table or an array. If your MIB contains scalar objects, you must run mib2c with a scalar-specific configuration file on the MIB nodes that contain the scalars.
From the C18 standard (6.2.5 §21) :
Arithmetic types and pointer types are collectively called scalar types.
void
is neither an arithmetic type, nor a pointer type, so it's not a scalar type.
From 6.2.5 §19 :
The
void
type comprises an empty set of values; it is an incomplete object type that cannot be completed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With