Sun Studio 12: Fortran Library Reference link: Create a Link to an Existing File

Example 1: link: Create a link named data1 to the file,

demo% cat tlink.f
        character*34 name1/’’/, name2/’data1’/
        integer*4 link, status
        status = link( name1, name2 )
        if ( status .ne. 0 ) stop ’link: error’
demo% f95 tlink.f
demo% ls -l data1
data1 not found
demo% a.out
demo% ls -l data1
-rw-rw-r-- 2 generic 2 Aug 11 08:50 data1