fd_data_function

Gamma: Version 4.0
Prev |  | Next

# `fd_data_function`

`fd_data_function` -- attaches a write-activated callback to a file.

## Syntax

    fd_data_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 data is written to the file associated with the `fd` or `file` pointer.

## See Also

`fd_open`, `fd_eof_function`, `fd_write`, `open`, `open_string`, `write`

Prev | Home | Next
`fd_close` | Up | `fd_eof_function`

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