send_string

Gamma: Version 4.0
Prev |  | Next

# `send_string`

`send_string` -- transmits strings for evaluation.

## Syntax

    send_string (task, string)

## Arguments

`task`

  A task descriptor as assigned to a `locate_task` call.

`string`

  Any string.

## Returns

A result depending on the receiving `task`.

## Description

This function transmits the `string` via synchronous interprocess communication to a non-Cascade DataHub receiving `task`. The `task` processes the message and returns a result based on that processing. If the `task` is a Gamma process, the message will be interpreted as a Lisp expression and evaluated. The return value will be the result of that evaluation. If an error occurs during the evaluation, an expression of the form: (error "error message") will be returned. If the message could not be delivered, nil is returned.

## Example

        Gamma> a = 5;
        5
        Gamma> b = 6;
        5
        Gamma> send_string(task,string("(+",a," ",b,")"));
        11

See the Common: Controlling the Cascade TextLogger section of the Log Functions chapter in the Cogent Tools Demo and Tutorials book for examples of this function used in context.

## See Also

`isend`, `locate_task`, `send`, `send_async`, `send_string_async`

Prev | Home | Next
`send_async` | Up | `send_string_async`

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