Announcement

Collapse
No announcement yet.

Arrays with UDT's

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Michael Mattias
    replied
    Just for future reference: "arrays" within UDTs are NOT arrays; they are tables.

    None of the "ARRAY xxx" verbs work with them, and the current release of the compilers does not flag attempts to use those verbs on tables as errors.

    (Maybe the next release will).

    MCM

    Leave a comment:


  • Guest's Avatar
    Guest replied
    Thanks alot!!! :]

    ------------------

    Leave a comment:


  • Wayne Diamond
    replied
    the Strings have to be fixed-dimension

    Code:
    #COMPILE EXE
    Type tName
    FieldA(5) as String * 50
    FieldB(5) as String * 50
    FieldID(5) as Integer
    End Type
    Global xName As tName
    
    FUNCTION PBMAIN() AS LONG
    xName.FieldA(0) = "my data"
    MSGBOX xName.FieldA(0)
    END FUNCTION

    ------------------

    Leave a comment:


  • Guest's Avatar
    Guest started a topic Arrays with UDT's

    Arrays with UDT's

    // Woops, subject was meant to be 'Arrays within UDT's'

    I know it is possible to use arrays within User Defined Type's but I can't seem to do it without generating errors, I'm trying to do something like this:

    Type Name
    Field() as String
    FieldB() as String
    FieldID() as Integer
    End Type

    Hmmm any suggestions anyone?

    Matt


    ------------------


    [This message has been edited by Matt Grace (edited November 15, 2000).]
Working...
X