Announcement

Collapse
No announcement yet.

Simple Question on TYPEs

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

  • Borje Hagsten
    replied
    A way around is to declare dynamic strings as STRING PTR instead, like:
    Code:
    TYPE MyType
      txt AS STRING PTR
    END TYPE
     
    ' Set some text to the string member:
    [email protected] = "Some text"
     
    ' Read the member's contents:
    TheString$ = [email protected]
    ------------------

    Leave a comment:


  • Warren Daniel
    started a topic Simple Question on TYPEs

    Simple Question on TYPEs

    Whenever I create a TYPE that includes a string, I have to designate a length for the string, and I was wondering the reasoning for having to do this? eg.

    Type Product
    Catagory AS STRING ' <-- Blows chunks during compile.
    Foobar AS STRING * 4096 ' <-- No problem.
    END TYPE

    Anyway around this?
Working...
X