News:

Function Finder  Find all the functions within source code files

Main Menu

confusion with types

Started by monkeybot, October 31, 2009, 08:15:31 AM

Previous topic - Next topic

monkeybot

Is it possible to have a linked list within a type ?


i want to inherit a linked list.into another type e.g.

type lines  
   num
   x
   y
endtype

type aster
   x
   y
   linedata as lines list
endtype

dim asteroid as aster

asteroid.x=100
asteroid.y=100

asteroid.linedata.num=120
   


kevin


    In your example your embedding a structure within a parent structure.    Fields in types are limited to basic data types, therefore you can't have 'containers' within the structures for the reasons outlined here

   That's not say it such as structure can't be done manually.. There's a bunch of examples that do it..  Here one


monkeybot