01_user_documentation:07_rgg_xl:02_xl:03_query:01_predicate:01_node:02_parametrized
This is an old revision of the document!
Parametrized
Parametrized pattern enables to bound query variables to parameters of the node pattern. E.g. Sphere(5) Sphere(r) both 5 and r are declared query variables, yet they are used differently:
- Sphere(5) matches Sphere where the value of the parameter is exactly 5.
- Sphere(r) matches all Spheres and bound the parameter to the query variable
r, making it available to use.
In the case of RGG, most 3d objects, turtle commands, and user defined modules the parametrized pattern is built around the fields of the objects.
For instance:
module Organ(float size, int age); // the pattern: Organ(float, int) is available void run() [ Organ(5,2) // bind 5 to the field size, and 2 to the field age F(3) // bind 3 to the field length ==>; ]
01_user_documentation/07_rgg_xl/02_xl/03_query/01_predicate/01_node/02_parametrized.1755849805.txt.gz · Last modified: 2025/08/22 10:03 by gaetan
