what are the implications of union data type in c when it is used for RPC?
what are the implications of union data type in c when it is used for RPC?
unions aren't directly an RPC mechanism.
that's not valid ANSI or ISO C. where you have 'declaration', would be an expression that has integer type. there is no "union identifier" before the switch keyword.
if you're talking about an extension to ANSI or ISO C, you haven't said what extension you are talking about.
I had no idea what you were talking about, either. I found this page:
http://www.cs.nyu.edu/courses/spring...2/class07.html
which indicates that these "unions" are unrelated to c unions. I doubt you'll be able to get any help here on this unless you have a language-related question.
Unions
Unions in the RPC definition language look very little like
their C counterparts.
In C, a union is a list of components that are conceptually
overlaid in a storage area.
In the RPC definition language, a union is a specification
of data types based on some criteria.
...
The definition of a union follows:
The identifier is the name of the union.Code:union identifier switch ( declaration ) { case_list };
The declaration is a simple declaration as defined
by the C language (an example will follow shortly).
Based on the value of the declaration, an element of the
case_list is used.
First of all, even if your question was C-related, that's a horrible question because it's vague, and we have no idea where you're coming from.what are the implications of union data type in c when it is used for RPC?
Second, I'm moving this to the networking forum. But please bear in mind that this forum caters primarily to C and C++ programmers - you'll find that most people don't want to the board filling up with general tech questions about other languages and protocols. Even the networking board exists to deal sepcifically with networking in the context of those languages.