-
Notifications
You must be signed in to change notification settings - Fork 0
Time
The current system time is available via the system supplied Date type. This type specifies “now” as the default value to use whenever a new variable is initialized to that type. A conversion operation can be specified which provides “now” in the desired format.
This type supports a variety of conversion operations which extract the desired time components as tuples such as H, M, S, ms, HMS, MDY, DMY, etc. So you can do this kind of thing:
current time = Date.HMS()
today = Date.MDY()
It is important to avoid naming collisions with system supplied types. At the moment these are Integer, Rational, Boolean, String, Nominal, Ordinal and Date. Since most types used by the modeler will be constrained versions of the system types (Pressure, instead of Rational, Tail Number instead of String) or base types such as Boolean, this should not be much of an encumbrance.
Copyright 2020, 2021, 2022, 2023, 2025 © Leon Starr under MIT Open Source License
- Why they are problematic
- Instance attribute creation values
- Boolean values
- Special values
- Enumerated values
- Action block
- Statement
- Single line action
- Multiple dependent actions on a single line
- An action spread across multiple lines
- A conditional group of single line actions
- Comments
- Finding instances
- Attribute access
- Creation and deletion
- Subclass migration
- Creating a table from a class
- Creating a table with a definition
- Converting a table into a class
- Set operations on tables
- Set comparisons on tables
- Join
- Rename
- Extend
- Aggregation
- Rank
- Image
- Input values
- Signatures and name doubling
- Output values
- Execution order
- Sequential execution
- Conditional execution
- Signals
- Scrall has no for_each action
- Iteration