Page Menu
Home
Xreate
Search
Configure Global Search
Log In
Docs
Questions
Repository
Issues
Patches
Internal API
Files
F3995314
Taste-example.TAS
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Jul 7, 2:51 AM
Size
543 B
Mime Type
text/plain
Expires
Thu, Jul 9, 2:51 AM (7 h, 54 m)
Engine
blob
Format
Raw Data
Handle
271319
Attached To
rXR Xreate
Taste-example.TAS
View Options
// This is a test program which can be compiled by the Taste-compiler.
// It reads a sequence of numbers and computes the sum of all integers
// up to these numbers.
program Test {
int i;
void Foo() {
int a, b, max;
read a; read b;
if (a > b) max = a; else max = b;
write max;
}
void SumUp() {
int sum;
sum = 0;
while (i > 0) { sum = sum + i; i = i - 1; }
write sum;
}
void Main() {
read i;
while (i > 0) {
SumUp();
read i;
}
}
}
Event Timeline
Log In to Comment