- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
character*(*) parameters in fortran require 2 parameters in Delphi, one of them being the string length (hidden argument in fortran).
Unfortunately these length parameters are after all other parameters.
What should I do to keep the character string argument and the length argument together ?
Example : fortran : parameters c1, c2, i1, i2 (c=char, i=integer)
Seen by Delphi :
c1, c2, i1, i2, l1, l2 (l1 and l2 being the length of c1 and c2 respectively).
Desirable is :
c1, l1, c2, l2, i1, i2
According to the release notes, this parameter order would be possible, but I am unable to find out how this can be obtained.
Thanks for any help offered !
Jan (Belgium)
Unfortunately these length parameters are after all other parameters.
What should I do to keep the character string argument and the length argument together ?
Example : fortran : parameters c1, c2, i1, i2 (c=char, i=integer)
Seen by Delphi :
c1, c2, i1, i2, l1, l2 (l1 and l2 being the length of c1 and c2 respectively).
Desirable is :
c1, l1, c2, l2, i1, i2
According to the release notes, this parameter order would be possible, but I am unable to find out how this can be obtained.
Thanks for any help offered !
Jan (Belgium)
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can force fortran compiler not to expect length at all using REFERENCE attribute on string dummy. See here for an illustration. You have to provide length explicitly, though, but you could do it either by hard-coding or by passing an additional real (i.e. not hidden) integer argument. In this way, you'd have full control over how and where length arguments are passed.
There's also compiler switch /iface: which can be set up on Project/Settings/Fortran/External Procedures/String Length Arg Passing (maybe it's moved somewhere nearby in newer CVF versions).
HTH
Jugoslav
There's also compiler switch /iface: which can be set up on Project/Settings/Fortran/External Procedures/String Length Arg Passing (maybe it's moved somewhere nearby in newer CVF versions).
HTH
Jugoslav

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page