www.delorie.com/gnu/docs/gcc/g77_398.html   search  
 
Buy the book!


Using and Porting GNU Fortran

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

10.5.2.18 ChMod Intrinsic (function)

 
ChMod(Name, Mode)

ChMod: INTEGER(KIND=1) function.

Name: CHARACTER; scalar; INTENT(IN).

Mode: CHARACTER; scalar; INTENT(IN).

Intrinsic groups: badu77.

Description:

Changes the access mode of file Name according to the specification Mode, which is given in the format of chmod(1). A null character (`CHAR(0)') marks the end of the name in Name---otherwise, trailing blanks in Name are ignored. Currently, Name must not contain the single quote character.

Returns 0 on success or a non-zero error code otherwise.

Note that this currently works by actually invoking /bin/chmod (or the chmod found when the library was configured) and so might fail in some circumstances and will, anyway, be slow.

Due to the side effects performed by this intrinsic, the function form is not recommended.

For information on other intrinsics with the same name: See section 8.11.9.41 ChMod Intrinsic (subroutine).


  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003