fd_eof_function

Gamma: Version 4.0
Prev |  | Next

# `fd_eof_function`

`fd_eof_function` -- attaches an `eof`-activated callback to a file.

## Syntax

    fd_eof_function (fd|file, code)

## Arguments

`fd`|`file`

  A file descriptor as returned from `fd_open`, or the name of a file pointer to a file that was opened by a call to `open` or `open_string`.

`code`

  Any valid Gamma program, executable code block, or statement.

## Returns

The return value of the executed `code`.

## Description

This function acts as a callback, causing the `code` to execute whenever the end of the file (`_eof_`) is reached during a call to `fd_read` or one of the other `read` functions. The `fd|file` argument identifies the file.

## See Also

`fd_open`, `fd_data_function`, `fd_write`, `open`, `open_string`, `write`

Prev | Home | Next
`fd_data_function` | Up | `fd_open`

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.