PRB: FOR3852 Error Function RESULT and [] Attribute SpecifierLast reviewed: April 9, 1996Article ID: Q149472 |
The information in this article applies to:
SYMPTOMSCompiling a source file that contains a function that uses the "[]" attribute specifier with the Fortran 90 function RESULT return type option causes the following compiler syntax error:
error FOR3852: syntax error detected between ) and RESULT CAUSEThe function RESULT return type option is a feature of Fortran 90 and is not supported with the "[]" attribute specifier.
RESOLUTIONIf you are using the function RESULT return type option, declare the function's attributes using the !ms$attributes metacommand.
STATUSThis behavior is by design.
MORE INFORMATION
Sample Code to Illustrate Problem! Compile options needed: none
program attrib
write(*,*) newx()
end
function newx[C] () result(x) ! FOR3852: syntax error
integer x
x = 39
end
Sample Code to Work Around Problem! Compile options needed: none
program attrib
print *, newx()
end
function newx() result(x)
!ms$attributes C :: newx
integer x
x = 39
end
|
Additional reference words: 4.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |