In particular the example set.
First we have an example that sets bit fields. Nowhere on that page are bit fields talked about or explained.
The bitfields are talked about in the type page linked at the bottom, but a user has no indication that is where it is talked about.
So the user goes and searches "bitfield" and is presented with 5 links and only the very last one talks about them.
Ironically, the Type page that explains bitfields has an example of a Union using bitfields.
That is the very first example.
Wouldn't it make more sense that, instead of introducing something that must be researched on another page, the first example be the simplest form of a union you can present?
The second example presents a named union:
Code: Select all
Union AUnion
a As UByte
b As Integer
End Union
Code: Select all
Dim MyUnion As AUnion
...
' Can only set one value in union.
MyUnion.a = 128
...
Print "Union: ";MyUnion.a
What is this an example of? I think this bit of code should be either removed or fleshed out to the point where it is actually demonstrating something.
I really think this page needs an overhaul.