Sun Studio 12: Fortran User's Guide

4.6.7 VALUE Attribute

The f95 compiler accepts the Fortran 2003 VALUE type declaration attribute.

Specifying a subprogram dummy input argument with this attribute indicates that the actual argument is passed “by value”. The following example demonstrates the use of the VALUE attribute with a C main program calling a Fortran 95 subprogram with a literal value as an argument:

C code:
#include <stdlib.h>
int main(int ac, char *av[])

Fortran code:
       subroutine to_fortran(i)
       integer, value :: i
       print *, i