Syntax for defining a structure

(3 posts) (3 voices)
  • Started 9 months ago by c_ridley
  • Latest reply from alonezhby

Tags:

  1. c_ridley

    member
    Joined: May '13
    Posts: 31

    I am trying to define a structured variable in vsl with no luck. I am trying to code something like this.

    struct pos_data {
    float XX;
    float yy;
    };

    Could someone provide me with the correct syntax? Also can a structure be defined anywhere in the task or must it be defined before task Execute?

    Thanks!

    Posted 9 months ago #
  2. soniab

    Studio/Virtools Guru
    Joined: Aug '09
    Posts: 97

    Hi,

    Personnally, I prefer use a class sub type in which I can defined all the members I need. It's similar to a struct. Did you test this solution?

    Posted 9 months ago #
  3. alonezhby

    enthusiast
    Joined: Mar '09
    Posts: 78

    hi,
    you need define the struct at the same level as the plocal or target like below:

    struct myStruct
    {
    .......
    };
    pLocal plocal
    {
    .......
    };

    Posted 9 months ago #

Reply

You must log in to post.