|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
mrpmorris
Joined: 31 Dec 2004 Posts: 11
|
Posted: Fri Dec 31, 2004 11:24 am Post subject: 'C' found where '/' was expected |
|
|
Hi everyone
I am evaluating your .net compiler. I am trying to compile an existing project. This project compiles fine for Win32 (Watcom compiler), but I am getting the above error on the last line of the following code
CHARACTER*4 cvtmap(27)/
& 'C','K','F','R',
& 'M','CM','MM','FT','IN',
& 'M/S','FT/S','FT/M','MPH','KTS','KPH',
& 'KG','LB','KN',
& 'S','MIN','HR',
& 'KPA','HPA','PSI','IHG',
& '#','%'/
As I mentioned, this works in Watcom for Win32. Can anyone suggest what is wrong with it?
|
|
Back to top |
|
|
Andrew
Joined: 09 Sep 2004 Posts: 232 Location: Frankfurt, Germany
|
Posted: Wed Jan 05, 2005 3:44 am Post subject: 'C' found where '/' was expected |
|
|
The initialisation technique used in your code is a VAX extension to the standard. There is a valid workaround for what you want to do however. This is to use a data statement such as:
Code: |
CHARACTER*4 cvtmap(27)
DATA cvtmap /
& 'C','K','F','R',
& 'M','CM','MM','FT','IN',
& 'M/S','FT/S','FT/M','MPH','KTS','KPH',
& 'KG','LB','KN',
& 'S','MIN','HR',
& 'KPA','HPA','PSI','IHG',
& '#','%'/
|
The VAX extension you used originally has been included in the compiler and it will be available in the next build. |
|
Back to top |
|
|
mrpmorris
Joined: 31 Dec 2004 Posts: 11
|
Posted: Wed Jan 05, 2005 4:08 am Post subject: 'C' found where '/' was expected |
|
|
That is brilliant news. I can't wait to try it out. Do you have a planned release date for the next buidl yet, or is it still to be decided? |
|
Back to top |
|
|
Andrew
Joined: 09 Sep 2004 Posts: 232 Location: Frankfurt, Germany
|
Posted: Wed Jan 05, 2005 4:20 am Post subject: 'C' found where '/' was expected |
|
|
There has only just been a release (December) of version 4.7. As yet there is no planned date, there have not been any significant changes since 4.7. Sorry I cannot be more specific, we will post an announcement on the forums when a new version is available. |
|
Back to top |
|
|
mrpmorris
Joined: 31 Dec 2004 Posts: 11
|
Posted: Wed Jan 05, 2005 4:49 am Post subject: 'C' found where '/' was expected |
|
|
>There has only just been a release (December)
Argh! If only I had trialled the compiler in November!
>there have not been any significant changes since 4.7
This change is actually significant to me. I wont both you with the details, but for many reasons I am not allowed to alter any text within a subroutine which is provided to me. All I am allowed to do is to add that subroutine to a project and use it.
I am currently able to compile this project for Win32 using Watcom, but I would really love to get this working in .net on the compact framework (it just reads / writes data files and crunches some numbers).
Rather than me waiting until your next release and then potentially discovering another peculiarity in the source like this one, do you think I could possible fieldtest your next compiler before release? |
|
Back to top |
|
|
Andrew
Joined: 09 Sep 2004 Posts: 232 Location: Frankfurt, Germany
|
Posted: Wed Jan 05, 2005 9:19 am Post subject: 'C' found where '/' was expected |
|
|
Please see your private email |
|
Back to top |
|
|
mrpmorris
Joined: 31 Dec 2004 Posts: 11
|
Posted: Wed Jan 05, 2005 1:08 pm Post subject: 'C' found where '/' was expected |
|
|
Excellent, things are looking very good!
I was able to compile the project first time. Amazingly it only took seconds, I am used to the LaheyFujistu Fortran.net compiler taking about 10-15 minutes to compile the same code!
I'm now trying to call some methods within the assembly from a C# WinForms application. The method is declared as...
SUBROUTINE SetXXX(VALUE)
IMPLICIT NONE
CHARACTER*(*) VALUE
XXX = VALUE
END
In Visual Studio / C# it is expecting the following...
(Salford.Fortran.Character * value, int _length_of_value)
If I wanted to pass Application.ExecutablePath, how would I do that?
Thanks
Pete |
|
Back to top |
|
|
mrpmorris
Joined: 31 Dec 2004 Posts: 11
|
Posted: Thu Jan 06, 2005 8:02 am Post subject: 'C' found where '/' was expected |
|
|
I'm sure I have already posted this, but I don't see it so I will post it again.
The new build is great! It compiled the project completely unaltered the first time. Amazingly it took about 15 seconds, whereas another well known Fortran compiler for VS takes 10-15 minutes to compile the same project!
I'm not trying to execute this Fotran routine from a C# WinForms application. One of the routines expects the following
SetXXX(Salford.Fortran.Char XXX, int _length_of_XXX_)
What do I need to pass from C# if I want to pass Application.ExecutablePath (a string)?
SUBROUTINE SetXXX(VALUE)
IMPLICIT NONE
CHARACTER*(*) VALUE
XXX = VALUE
END
|
|
Back to top |
|
|
mrpmorris
Joined: 31 Dec 2004 Posts: 11
|
Posted: Thu Jan 06, 2005 8:03 am Post subject: 'C' found where '/' was expected |
|
|
I'm sure I have already posted this, but I don't see it so I will post it again.
The new build is great! It compiled the project completely unaltered the first time. Amazingly it took about 15 seconds, whereas another well known Fortran compiler for VS takes 10-15 minutes to compile the same project!
I'm not trying to execute this Fotran routine from a C# WinForms application. One of the routines expects the following
SetXXX(Salford.Fortran.Char XXX, int _length_of_XXX_)
What do I need to pass from C# if I want to pass Application.ExecutablePath (a string)?
SUBROUTINE SetXXX(VALUE)
IMPLICIT NONE
CHARACTER*(*) VALUE
XXX = VALUE
END
|
|
Back to top |
|
|
Anonymous Guest
|
Posted: Mon Feb 21, 2005 7:45 am Post subject: 'C' found where '/' was expected |
|
|
This usage of a forward slash is a VAX extension to standard Fortran.
FTN95 can normally handle this VAX extension but it fails in this case.
The standard Fortran is to use a separate DATA statement. |
|
Back to top |
|
|
|
|
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
|