Announcement

Collapse
No announcement yet.

What is wrong here?

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

  • Kev Peel
    replied
    Dave picked up on the zero bound. Good catch!

    Leave a comment:


  • colin glenn
    replied
    I think Knuth may have been referring to this?
    temp = Dir$("*.*", To Listing(x)

    Leave a comment:


  • Dave Biggs
    replied
    Code:
    Dim Listing(1000) As DirData
    Works better!

    Leave a comment:


  • Knuth Konrad
    replied
    There's also a missing closing bracket, don't know if that happened thru your copying to the forum or if it's in the help file as well.

    Leave a comment:


  • Kev Peel
    replied
    It's a mistake in the docs. Change "Listing" data type to the built-in DIRDATA:

    Code:
     
     Dim Listing(1 To 1000) As DirData

    Leave a comment:


  • norbert doerre
    started a topic What is wrong here?

    What is wrong here?

    Following is a sample from PB Help file (DIR$ function) I just tested:

    Code:
    Dim Listing(1 To 1000) As String
    Dim x As Long
    Dim temp As String
    temp = Dir$("*.*", To Listing(x)
    While Len(temp) And x < 1000
      Incr x
      temp = Dir$(Next, To Listing(x))
    Wend
    Error message:
    Data type mismatch
    Line 4: temp = Dir$("*.*", To Listing(x)
Working...
X