Ampliphi
Quick Look
// Global declarations
int[5] arr;
int sum;
int i;
bool cond;
// Entry point
procedure main {
sum = 0;
i = 0;
// Note: Control flow conditions must be evaluated into a boolean variable first!
cond = i < 5;
while (cond) {
sum = sum + arr[i];
i = i + 1;
// Re-evaluate condition for the next iteration
cond = i < 5;
}
}Getting Started
Installation
Usage
Language Guide
Variables and Types
Procedures
Control Flow
Formal Grammar
Last updated
Was this helpful?

