aboutsummaryrefslogtreecommitdiff
path: root/pkg/language/doc/access.hlp
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /pkg/language/doc/access.hlp
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'pkg/language/doc/access.hlp')
-rw-r--r--pkg/language/doc/access.hlp48
1 files changed, 48 insertions, 0 deletions
diff --git a/pkg/language/doc/access.hlp b/pkg/language/doc/access.hlp
new file mode 100644
index 00000000..d68649b4
--- /dev/null
+++ b/pkg/language/doc/access.hlp
@@ -0,0 +1,48 @@
+.help "access,imaccess" Feb86 language
+.ih
+NAME
+access -- test whether a file exists
+.ih
+USAGE
+bool = access (filename)
+bool = imaccess (imagename)
+.ih
+PARAMETERS
+.ls filename
+The name of the file whose existence is to be tested.
+.le
+.ls imagename
+The name of the image whose existence is to be tested.
+.le
+.ih
+DESCRIPTION
+\fIAccess\fR is a boolean intrinsic function returning true ("yes") if the
+named file exists. \fIAccess\fR can only be called as a function in an
+expression, not as a task.
+.ih
+EXAMPLES
+1. Type a file if it exists.
+
+.nf
+ if (access ("lib$motd"))
+ type ("lib$motd")
+ else
+ error (11, "File not found")
+.fi
+
+2. Tell if a file and an image exists.
+
+.nf
+ cl> = access ("lib$motd")
+ cl> = imaccess ("dev$pix")
+.fi
+
+
+.ih
+BUGS
+An optional second argument should be added to test whether the named file
+can be accessed for reading or writing.
+.endhelp
+.ih
+SEE ALSO
+directory