A1304: Field <FieldName> is not declared in specified type

[ERROR]

Description

The field specified is not part of the structured type associated with the variable addressed. <FieldName> is the name of the field addressed in the variable.

Note

Not all assembler backends do support structured types. Assembler not supporting them will not issue this message.

Example
  myType:  STRUCT

  field1:    DS.W 1

  field2:    DS.W 1

           ENDSTRUCT

           XREF myData:myType

           XDEF entry

  CodeSec: SECTION

  entry:

           NOP

           NOP

           LD A, myData:field33
  
Example
  myType:  STRUCT

  field1:    DS.W 1

  field2:    DS.W 1

           ENDSTRUCT
 
           XREF myData:myType

           XDEF entry

  CodeSec: SECTION

  entry:

           NOP

           NOP

           LDX myData:field33
  
Example
  myType: STRUCT

  field1: DS.B    1

  field2: DS.B    1

          ENDSTRUCT

          XREF    myData:myType

  const:  SECTION

          DC.W    myData:field1

          DC.W    myData:field3   ; no field3
  
Example
myType: STRUCT

field1:   DS.B    1

field2:   DS.B    1

        ENDSTRUCT

        XREF    myData:myType

const:  SECTION

         LRW R4, [myDataField33]

         LD.B     R4,(R4,0)

         BR   *

         ALIGN 4

myDataField33: DC.W myData:field33
Tips

Change the name of the field to an existing field or define the field in the structured type.

Example
myType:  STRUCT

field1:    DS.W 1

field2:    DS.W 1

         ENDSTRUCT


         XREF myData:myType

         XDEF entry

CodeSec: SECTION

entry:

         NOP

         NOP

         LD A, myData:field2
Example
  myType:  STRUCT

  field1:    DS.W 1

  field2:    DS.W 1

           ENDSTRUCT

           XREF myData:myType

           XDEF entry

  CodeSec: SECTION

  entry:

           NOP

           NOP

           LDX myData:field2
  
Example
myType: STRUCT

field1:   DS.B    1

field2:   DS.B    1

        ENDSTRUCT

        XREF    myData:myType

CodeSec: SECTION

         LRW R4, [myDataField2]

         LD.B     R4,(R4,0)

         BR   *

         ALIGN 4

myDataField2: DC.W myData:field2