Loading ...
Sorry, an error occurred while loading the content.

Re: QFileStream of multidimensional arrays

Expand Messages
  • Pavel Minayev
    ... IMHO you should specify array SIZE instead of dimensions, like this: File.SaveArray(A(1,1), 100*100) works
    Message 1 of 3 , Oct 1, 2000
    View Source
    • 0 Attachment
      --- In rapidq@egroups.com, "Bruno Schaefer" <bup.schaefer@p...> wrote:
      > DIM A(1 TO 100,1 TO 100)AS LONG
      > DIM File AS QFileStream
      > For I = 1 TO 100
      > FOR J = 1 TO 100
      > A(I,J) = I + J
      > NEXT J
      > NEXT I
      > File.Open("array.txt", fmCreate)
      > File.SaveArray (A(1,1), 100,100) '???
      > File.Close
      >
      > This does not work ! Why? What is wrong?

      IMHO you should specify array SIZE instead of dimensions, like this:

      File.SaveArray(A(1,1), 100*100) 'works
    • chrome
      On Sun, 1 Oct 2000, Bruno Schaefer wrote: Tried making a single-dimension array with its element being a User Defined Type? If you need to to matrix math,
      Message 2 of 3 , Oct 1, 2000
      View Source
      • 0 Attachment
        On Sun, 1 Oct 2000, Bruno Schaefer wrote:

        Tried making a single-dimension array with its element being a User Defined
        Type? If you need to to matrix math, then this could make coding more
        cumbersome, but otherwise maybe not make too much of a difference...

        >This is a question about the usage of QFileStream with
        >multidimensional arrays.
        >
        >It works fine with single dimensional arrays:
        >[...]
        >But if you want to do the similar with a twodimensional array, e.g.:
        >[...]
        >This does not work ! Why? What is wrong?
        >
        >In Williams docs I can find the description of singledimensional
        >cases only.
        >
        >Many thanks for an answer !
        >
        >Greetings,
        > Bruno Schäfer

        | chrome@... ; KD7KJG ; yet another linux guru in training |
        | kthulhu for president in 2000: not quite your average candidate |
      Your message has been successfully submitted and would be delivered to recipients shortly.