| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (9 out of 15)

Call-Function Function

The call function calls a specified function with its arguments. It lets you call a user-defined function indirectly when you know the function arguments.

The syntax is:

An example is:

Note that the-measurement-for is a relation. You cannot use the call function to directly call system functions, which are G2 functions that do not have function-definition items. You could, however, define a function to call system functions, and then use call function to call that function. Within a normal function call, such as:

if combine is a local name, G2 calls the function definition within that local name.

| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (9 out of 15)

Copyright © 1997 Gensym Corporation, Inc.