Announcement

Collapse
No announcement yet.

Maximum length of ASCIIZ

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

  • Maximum length of ASCIIZ

    Lance, Dave --
    I tried to understand performance of long ASCIIZ and found that, for example, following fragment generates GPF
    Code:
    #Compile Exe
    #Register None
    Function PbMain() As Long
    Dim ab As Asciiz * 1040000
    End Function
    If to add some strings, GPF occurs with less length.
    So, I have two questions/suggestions:
    1) I'm not against restrictions, but they should be strictly defined in documentation.
    2) If compiler is not agree, why it keeps silence ?

  • #2
    Hi Semen

    indeed you are right - I think that notwithstanding whatever is happening on the Linux/Com side of PB that we should slowly set our sights on a PBcc/PBDLL update.

    My 0.02 rappen (swiss cents)

    Florent

    Comment


    • #3
      The value 1035940 is the largest one that will not cause an
      error. No obvious truncation error. (2^21-1035940=12636 which
      may be the length of something).

      On my Windows NT 4.0 system I get a stack overflow error. Not GPF.

      Comment


      • #4
        I'll forward this to R&D... thanks guys.



        -------------
        Lance
        PowerBASIC Support
        mailto:[email protected][email protected]</A>
        Lance
        mailto:[email protected]

        Comment

        Working...
        X