-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support multi-dimensional arrays in FPP #3083
Comments
Multi-dimensional Arrays in FPPTechnical Specification1. OverviewThis specification defines the syntax and semantics for multi-dimensional arrays in FPP (F Prime Prime). 2. Syntax2.1 Basic Syntax
Where:
2.2 Default Value SpecificationDefault values for multi-dimensional arrays can be specified in several ways:
3. Semantics3.1 Memory LayoutMulti-dimensional arrays are stored in row-major order (C-style). For a 2D array with dimensions [M][N], element (i,j) is stored at offset (i * N + j). 3.2 Type Checking
3.3 Default Value Rules
4. Examples
5. Implementation Considerations5.1 Code GenerationThe FPP compiler should generate:
5.2 Performance
6. Backwards CompatibilityThis feature maintains backwards compatibility with existing single-dimension array syntax. All existing array definitions remain valid. 7. Error HandlingThe compiler should generate clear error messages for:
8. Limitations
9. Future Considerations
|
Feature Description
Support an FPP notation for multi-dimensional arrays like:
Rationale
If developers want to store something like a matrix as a parameter, they have to do it in two stages like here. It would be convenient to define it in one place.
The text was updated successfully, but these errors were encountered: