24.11.2014 Views

Open Watcom FORTRAN 77 Language Reference

Open Watcom FORTRAN 77 Language Reference

Open Watcom FORTRAN 77 Language Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>FORTRAN</strong> Statements<br />

Example:<br />

DIMENSION A(:), B(:,:)<br />

.<br />

.<br />

.<br />

ALLOCATE( A(N), B(0:4,5), STAT=IALLOC )<br />

IF( IALLOC .NE. 0 ) PRINT *, ’Allocation failure’<br />

.<br />

.<br />

.<br />

DEALLOCATE( A, B, STAT=IFREE )<br />

IF( IFREE .NE. 0 ) PRINT *, ’Deallocation failure’<br />

An attempt to deallocate an unallocated array results in an execution-time error. The array must be<br />

allocated first (see the ALLOCATE statement).<br />

An array that was allocated using the LOCATION= specifier need not be deallocated.<br />

For more information on arrays, see the chapter entitled "Arrays" on page 159.<br />

DEALLOCATE Statement 43

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!