Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17060 Discussions

[value] attribute from powerstation 1 problem

Intel_C_Intel
Employee
457 Views
I am porting thousands lines of Fortran Powerstation 1 source code to Visual Fortran 6.5.
I am having problems with proc/func interface declaration : In the following code :

interface to integer function pal_def(i[value])
integer i
end

The [value] attribute doesn't go with VF 6.5 complier.
One solution would be to change it to :

interface to integer function pal_def(i)
!DEC$ ATTRIBUTES VALUE :: i
integer i
end

Too long. I have thousand of line to change !

Is there a simple solution ? (compiler option, utility...)
Is there some other powerstation-specific problem I should pay attention to ?
0 Kudos
3 Replies
Steven_L_Intel1
Employee
457 Views
Yes, Visual Fortran does support [VALUE]. However, it does not support "file scope" placement of INTERFACE TO blocks at the beginning of the source file. You would have to move the INTERFACE TO blocks inside the routines that use the interfaces, or put them in a MODULE which you then USE in the routines.

Steve
0 Kudos
Intel_C_Intel
Employee
457 Views
reply to Steve L. Thank you for your answer... but :
Moving the INTERFACE TO blocks inside the routines and putting the blocks in a MODULE don't help.
It seems that VF6.5 doesn't accept [VALUE] statement in the function/procedure head line.
For example :
integer function FSUB (I[VALUE],J[VALUE])
FSUB = I * J
return
end

doesn't work. Compiler says :
Error: Syntax error, found '[' when expecting one of: , : )
0 Kudos
Steven_L_Intel1
Employee
457 Views
I'd have to see a small but complete example. Please send it to vf-support@compaq.com

Steve
0 Kudos
Reply