It's always the way. Spend hours searching for an explanation of something and find it just after you post. Ok, so I get Unions now. They are, if I understand correctly, a method of having several fields in a Struct or Class which are of the same data size and share the same memory address.
So I realised that - since everything is a 32bit datatype, I could just define the function as taking an integer and have four "wrapper" functions to convert the given datatype to an int, if and as required. Works great.
|