GELLO is Object Oriented. Lets set up a package for a subatomic particle and then make an instance, and declare a statement that is either true or false as the result.
Here's how to do a package. We will keep it in the one GELLO file but often these packages form a data model and/or a library of functions that can be imported.
These would be saved with the extension .gello_model (see earlier tutes).
Package SubatomicParticle |
---|
This example uses useful ISO21090 datatypes, in this case highlighting a PQ which is a Physical Quantity.
Lets create an instance:
Let aQuark: Quark = Quark {name = 'Up', |
---|
..and have a final declarative 'outer expression':
aQuark.mass > PQ{value=1.00, unit='MeV/c^2'} |
---|
When we run this, here are the variables and the result: