[omniORB] Re: <no subject>

Duncan Grisby dgrisby@uk.research.att.com
Tue, 01 May 2001 12:30:07 +0100


On Tuesday 1 May, kexin li wrote:

>  Can I declare two dimentiton array like
> Codetable[][3]  in IDL.

Not like that. Depending on what you are trying to do, you either want
a sequence of sequences or an array of arrays. I recommend that you
avoid anonymous types for clarity. Do something like

  typedef sequence<Codetable>    CodetableSeq;
  typedef sequence<CodetableSeq> CodetableSeqSeq;

or

  typedef Codetable    CodetableArr[3];
  typedef CodetableArr CodetableArrArr[4];

The difference between sequences and arrays is that arrays are fixed
length, sequences are variable length.

Cheers,

Duncan.

-- 
 -- Duncan Grisby  \  Research Engineer  --
  -- AT&T Laboratories Cambridge          --
   -- http://www.uk.research.att.com/~dpg1 --