forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

error 1148 when building a .NET-DLL

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
4feuersalamander



Joined: 25 Jan 2012
Posts: 16

PostPosted: Thu Aug 17, 2017 12:54 pm    Post subject: error 1148 when building a .NET-DLL Reply with quote

When trying to build a .NET DLL, at the export of the following subroutine I got the message:
error 1148 - Array PROPTOT is not of assumed shape, and so cannot appear as an argument to a routine containing an ASSEMBLY_INTERFACE,
the subroutine starts with the following code:
Code:
   
SUBROUTINE STPFLASH(TIN,PIN,X1,X2,X3,X4,X5,X6,X7,X8,X9,X10,
     &   X11,X12,X13,X14,X15,X16,X17,X18,X19,X20,X21,IUNITIN,
     &   FRAC,HTOT,STOT,UTOT,VTOT,PROPTOT,XL,XV,PROPL,PROPV,
     &   FUGL,FUGV,FUGAL,FUGAV)
C***********************************************************************
      ASSEMBLY_INTERFACE(NAME="STPFLASH")
      IMPLICIT REAL*8 (A-H,O-Z)
C      INTEGER*4 IUNITIN
      PARAMETER (MAXC=21,NAUX=16)
      PARAMETER (NPROP=24)
      DIMENSION XVEC(MAXC) , LIST(MAXC) , ZFEED(MAXC)
      DIMENSION X(MAXC) , Y(MAXC) , AUXX(NAUX) , AUXY(NAUX)
      DIMENSION FGX(MAXC) , FGY(MAXC)
      DIMENSION PROPL(NPROP) , PROPV(NPROP) , PROPTOT(NPROP)
      DIMENSION HSUVTOT(5)
      DIMENSION XL(MAXC) , XV(MAXC) , FUGL(MAXC) , FUGV(MAXC) ,
     &          FUGAL(MAXC) , FUGAV(MAXC)
C
The same error message were given for the arrays XL,XV,PROPL,PROPV,FUGL,FUGV,FUGAL,FUGAV

with the same code it was no problem to build a Win32-DLL. Any idea?

Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 4915
Location: Salford, UK

PostPosted: Thu Aug 17, 2017 3:06 pm    Post subject: Reply with quote

I have had a quick look at this but I can't see what is wrong.

It might work if you make these arrays "star-sized". For example:

Code:
DIMENSION XL(*)
Back to top
View user's profile Send private message
4feuersalamander



Joined: 25 Jan 2012
Posts: 16

PostPosted: Thu Aug 17, 2017 3:33 pm    Post subject: Reply with quote

It doesn't changed anything, if I made all those arrays star-sized, I get the error 1148 message furthermore
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 4915
Location: Salford, UK

PostPosted: Thu Aug 17, 2017 5:28 pm    Post subject: Reply with quote

The compiler is checking for assumed shape arrays of the form PROPTOT(:) or, for example, PROPTOT(1:). So this appears to be a requirement for .NET.
Back to top
View user's profile Send private message
4feuersalamander



Joined: 25 Jan 2012
Posts: 16

PostPosted: Thu Aug 17, 2017 5:58 pm    Post subject: Reply with quote

I really don't understand what do you mean with (:). Is it possible to change the code for acceptance by the compiler or seems it impossible to use arrays in the parameter list of a subroutine if building a .NET-DLL?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 4915
Location: Salford, UK

PostPosted: Thu Aug 17, 2017 10:10 pm    Post subject: Reply with quote

Yes you can modify the code to use "assumed shape" arrays. This is a feature of the FORTRAN 90 standard. Just type "FORTRAN assumed shape" into Google to find out what it means. Otherwise perhaps one of the Fortran experts on this forum will provide the details.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group