Показать сообщение отдельно
Старый 25.06.2012, 19:57   #2
kvitaliy
Оператор ЭВМ
 
Регистрация: 10.01.2007
Сообщений: 37
Написано 6 полезных сообщений
(для 5 пользователей)
Re: Матрёшка из прототипов

Как вариант проблему можно решить через указатели.
Structure TypeDef
    Name.s
    *VarField.Var[#MAX_VARFIELDS]
    VarFields.i

    CodeNum.i
EndStructure

Structure Var
    Name.s
    DataType.b                ;DataType = DATATYPE_
    CustomType.TypeDef    ;If DataType = DATATYPE_CUSTOM then this is the typedef this custom variable is
    TypeDef.TypeDef        ;Type definition this variable belongs to
    Scope.b
    Owner.Func        ;Scope = SCOPE_
    Value.s                ;Value of a SCOPE_CONSTANT variable
    CustomTypeTemp.s        ;Temporary fields
    DefinitionPos.i            ;Location of variable definition
    
    CodeNum.i
EndStructure
(Offline)
 
Ответить с цитированием