Paule wrote:

>Could you give me a pointer on how to solve memory allocation problems
>by object-oriented means instead of using pointers and allocating "chunks"
>of memory in multiples of the size of a given primitive data type? As you
>said, Fortran pre-allocation is wonderful, only if you can map out a static
>memory space at design time.

Allocate all arrays in the called Fortran routine in the DLL with (1).

In the Pascal calling routine allocate the memory needed dynamically with 
GetMem and pass a pointer or pointers to the Fortran routine in the DLL. 
The GetMem allocation can be determined at run time.  If you feel you need 
more flexibility for error control, write the calling routine as a 
command-line program and pass whatever data is needed to it as file names 
on the command line and load the allocated memory from them. Then use a 
ShellExec on the little command line program.

If you want sample code, please ask off-list.

Irwin Scollar

_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to