Jump to content

Recursive type structures for references


Recommended Posts

Hi,

I'd really like to see support for recursive typing also outside LVOOP so that a reference type such as a queue could refer to the type that encloses the reference type. I see no reason why not to support such types. Reference types are not allocated at compile time so there would be no infinite memory allocations.

Example 1: Linked list

Typdef List.ctl

{

Element : I32

Queue : Queue of List.ctl

}

Example 2: Tree

Typdef Tree.ctl

{

Element : I32

Children : Array of (Queue of Tree.ctl)

}

Example 3: Recursive VI

VI Recursive.vi

{

Connector Pane

{

reference : Strictly_typed_VI of Recursive.vi

}

}

I tested this last case as I wasn't sure if this would work but it doesn't. The strictly typed VI reference on the connector pane doesn't act like a typedef so it doesn't update as VI connector pane gets updated. As a result when you browse for a connector pane type and select the VI itself, it uses a fixed connector pane before the connector pane change and doesn't dynamically update the connector pane change to the reference on the connector pane. Simple :)

Tomi

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.