Results 1 to 2 of 2

Thread: Sequence inside a structure

  1. #1
    msorensson is offline Registered User
    Name: Markus Sorensson
    Organization: MSTECH
    Project: ice testing
    Join Date
    Jun 2008
    Posts
    5

    Sequence inside a structure

    I´m trying to put a sequence inside a structure but I get a Slice compilation error. Is it possible?

    Example:

    Code:
    structure MyStructure{
      sequence<byte> someData;
      sequence<byte> moreData;
    };
    Thanks for your help

  2. #2
    xdm's Avatar
    xdm
    xdm is online now ZeroC Staff
    Name: Jose Gutierrez de la Concha
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Sep 2003
    Location
    La Coruña, Spain
    Posts
    588
    Hi Markus

    You can put sequences inside a struct , note that the correct keyword is "struct" not "structure", actually you cannot define the sequence type inside the struct but you can write what you want as follow:

    Code:
    module Demo
    {
    
    sequence<byte> ByteSeq;
    
    struct MyStructure
    {
        ByteSeq someData;
        ByteSeq moreData;
    };
    
    };
    Hope this help,
    José

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Error creating structure
    By Andrew Midson in forum Bug Reports
    Replies: 2
    Last Post: 11-20-2009, 05:55 AM
  2. The structure and sequence of bytes
    By soff.dong in forum Help Center
    Replies: 1
    Last Post: 10-15-2008, 04:11 AM
  3. Set properties inside Ice::Application
    By vanjogja in forum Help Center
    Replies: 2
    Last Post: 01-25-2008, 05:57 AM
  4. Replies: 1
    Last Post: 06-21-2006, 11:41 PM
  5. Replies: 4
    Last Post: 06-22-2005, 09:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •