Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Initialization of complex data types

hasse
2006-04-28
2006-05-04
  • hasse - 2006-04-28

    Hello all!

    I've declared own datatypes and have problems initializing them

    example:

    TYPE DWORD_PARAMETER :

    STRUCT

    Value : DWORD;
    
    OldValue : DWORD;
    

    END_STRUCT

    END_TYPE

    TYPE Param :

    STRUCT

    ComponentName : STRING;
    
    Timeout : DWORD_PARAMETER;
    

    END_STRUCT

    END_TYPE

    I have declared this variable in a program and want to initialize it

    myParam : Param := (ComponentName := 'Test');

    How do i initialize the Timeout variable in the same way?

    Thanks in advance

     
  • Anonymous - 2006-05-04

    Originally created by: Frank Hailer

    Hello

    The whole initialisation is:

    myParam : Param := (ComponentName := 'Test', Timeout := (Value:= 5, OldValue:= 10));

    Bye, Frank Hailer

     

Log in to post a comment.