Page Menu
Home
Xreate
Search
Configure Global Search
Log In
Docs
Questions
Repository
Issues
Patches
Internal API
Files
F2731107
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
Sat, Mar 14, 3:27 AM
Size
543 B
Mime Type
text/plain
Expires
Mon, Mar 16, 3:27 AM (1 d, 10 h)
Engine
blob
Format
Raw Data
Handle
243832
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