Silverfrost Forums

Welcome to our forums

Copying stuff to a memory address

23 Apr 2014 2:07 #13978

For reasons too complicated to go into, we have a series of arrays and variables that we'd like to 'get a handle to' via a single address.

We could do it by writing/reading to/from a scratch file but wondered if there was any way to do it 'in memory' (for speed as much as anything else).

So, i think what I'm asking is whether there's a way to do an unformatted write/read to/from an internal 'unlimited-length' character buffer...

Any thoughts/tricks appreciated!

K

24 Apr 2014 7:03 #13986

You could try memory routines. See help for:

  • Storage management routines
  • Other machine-level facilities This may help

John

24 Apr 2014 8:21 #13987

See also 'Extended ALLOCATE statement'

25 Apr 2014 8:44 #13988

Thanks for the replies, i'll take a look.

K

25 Apr 2014 1:11 #13992

The scratch file isn't as bad as you think, as providing you access it soon after creating and it is small enough (which is still pretty big!) it is still in the cache.

Alternatively, you can use RAMdisk software and read and write a scratch disk there.

In both cases, you are using very standard Fortran code.

If you need the information to be available to multiple programs, then you can't use an automatically-named file, you have to give it a name that all other programs 'know'.

Eddie

29 Apr 2014 4:31 #14015

If you are going to use scratch files, be warned that opening and closing the same file many times in Windows does have some known problems, as there can be delays releasing file handles when closing files.

John

29 Apr 2014 10:03 #14018

I thought it might only be one file.

Some things in Windows aren't great 😦

E

Please login to reply.