.\" @(#)chdir.3f 1.3 86/01/02 SMI; from UCB 4.2 .TH CHDIR 3F "98/09/16" .SH NAME chdir \- change default directory .SH SYNOPSIS .B integer*4 function chdir (dirname) .br .B character*(*) dirname .SH DESCRIPTION Change the default directory for creating and locating files to .I dirname. Zero is returned if successful; an error code otherwise. .\" .IX chdir "" \fLchdir\fP .IX change "default directory" .IX default "directory change" .IX directory "default change" .\" .SH FILES .\" .B libF77.a .SH "SEE ALSO" .BR chdir (2), .BR cd (1), .BR perror (3F) .SH RESTRICTIONS Path names cannot be longer than .B MAXPATHLEN as defined in .BR . .PP Use of this function may cause .B inquire by unit to fail. .LP Certain FORTRAN file operations reopen files by name. Using .B chdir while doing I/O may cause the runtime system to lose track of files created with relative path names, including those files that are created by .B open statements without file names.