Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
|
ports [2026/07/09 07:11] hermann |
ports [2026/07/09 07:16] (current) hermann |
||
|---|---|---|---|
| Line 40: | Line 40: | ||
| ===== Output Ports ===== | ===== Output Ports ===== | ||
| - | A functor may produce one or more outputs. In EGO Script, outputs are bound to variables using the '':='' operator. When a functor produces multiple outputs and only some are needed, the underscore ''_'' discards unwanted ones: | + | A functor may produce one or more outputs. In EGO Script, outputs are bound to variables using the '':='' operator (see [[ego_script#functor_calls|Functor calls]]). When a functor produces multiple outputs and only some are needed, the underscore ''_'' discards unwanted ones: |
| <code> | <code> | ||
| Line 57: | Line 57: | ||
| Port names follow different conventions depending on context: | Port names follow different conventions depending on context: | ||
| - | * **In EGO Script**, port names are written in camelCase with a lowercase first letter: ''cellType'', ''resultIsSparse'', ''nullValue''. | + | * **In EGO Script**, port names are written in camelCase with a lowercase first letter: ''cellType'', ''resultIsSparse'', ''nullValue''. See [[ego_script#nominal_syntax|Nominal syntax]] for how port names appear in functor calls. |
| * **In the GUI**, the same ports are displayed with spaces between words and all words capitalised: "Cell Type", "Result Is Sparse", "Null Value". | * **In the GUI**, the same ports are displayed with spaces between words and all words capitalised: "Cell Type", "Result Is Sparse", "Null Value". | ||
| Line 66: | Line 66: | ||
| Every port has a **type** that determines what data it can carry. A port accepts data of its exact type or any type that can be automatically converted to it. See the [[type_system|type system]] documentation for the full list of types and their conversions. | Every port has a **type** that determines what data it can carry. A port accepts data of its exact type or any type that can be automatically converted to it. See the [[type_system|type system]] documentation for the full list of types and their conversions. | ||
| - | Two special constants are available for any input port regardless of type: | + | Two special constants are available for any input port regardless of type (see [[ego_script#constants|Constants]]): |
| * ''.UNBOUND'' — the port is not connected, or its connection is deliberately being ignored. Used especially when copying a fragment of a model to a text editor, where some connections may not be part of the selection. | * ''.UNBOUND'' — the port is not connected, or its connection is deliberately being ignored. Used especially when copying a fragment of a model to a text editor, where some connections may not be part of the selection. | ||