Skip to content

Reading multiple attributes

Leon Starr edited this page Nov 6, 2023 · 2 revisions

You can assign multiple attribute values if a single instance is selected to the same number of scalar values. Each scalar value must be typed appropriately.

calling fnum, calling height = Floor( Name: ^calling floor ).(Number, Height)

The selection must find exactly one instance or a runtime error will result.

A safer approach might be:

calling floor .= Floor( Name: in.calling floor )
calling floor? calling fnum, calling height = calling floor.(Number, Height) : No calling floor -> ME

If, however, you are certain that one instance will be selected, say based on the requirement for an initial population, or by filtering input to your domain via a domain operation, for example, to ensure that the appropriate instances exist, then you may be satisfied to simply fail by not finding the instance and enjoy the simplicity in the first example.

Introduction

Model semantics

Flows (as Variables)

Constants and literals

Structure of an activity

Accessing the class model

Data flow


Grammar and parsing notes

Components

Clone this wiki locally