optional values

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

optional values

Rob Torop
I will be creating some idl  where the records have many fields, most of which are optional, and I'm looking for the most concise way to do it. Suppose I have something like this

protocol someproto {
     record somerec {
            typea a;
            typeb b;
      }
}

I want both a and b to be optional.  Do I need to do this?

protocol someproto {
   record somerec {
       union { null, typea } a = null;
       union { null, typeb}  b = null;
  }
}