J?rgen Hestermann <juergen.hesterm...@gmx.de> wrote >andrew.benn...@ns.sympatico.ca schrieb: >> After using BlockRead to fill a 2D dynamic array, I get an access >>violation on the very first reference. A 2D array with only one >>dimension dynamic works OK. What am I missing? > >Maybe you blundered into the same trap as so many others who do not know >that dynamic arrays are *pointers* (to arrays). It is one of the sins >done by Borland to abandon the once strict logic that in Pascal the >syntax is always context independend. Now this is no longer the case >(i.e. for dynamic arrays). After wasting another 2 days reading the documentation, I returned to blind experiment ...
I find that BlockRead(F, A[J,0], RightDim*Sizeof(Single), count) works where BlockRead(F, A[J], RightDim*Sizeof(Single), count) does not. That is, reading RightDim elements into a space the size of one element is OK but reading them into a space of the correct size is not. Personally, I would call that a BUG. Andrew Bennett _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal