Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
20
Task/Variadic-function/Aime/variadic-function-1.aime
Normal file
20
Task/Variadic-function/Aime/variadic-function-1.aime
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
void
|
||||
f(...)
|
||||
{
|
||||
integer i;
|
||||
|
||||
i = 0;
|
||||
while (i < count()) {
|
||||
o_text($i);
|
||||
o_byte('\n');
|
||||
i += 1;
|
||||
}
|
||||
}
|
||||
|
||||
integer
|
||||
main(void)
|
||||
{
|
||||
f("Mary", "had", "a", "little", "lamb");
|
||||
|
||||
return 0;
|
||||
}
|
||||
32
Task/Variadic-function/Aime/variadic-function-2.aime
Normal file
32
Task/Variadic-function/Aime/variadic-function-2.aime
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
void
|
||||
output_date(date d)
|
||||
{
|
||||
o_form("~%//f2/%//f2/", d.year, d.y_month, d.m_day);
|
||||
}
|
||||
|
||||
void
|
||||
g(...)
|
||||
{
|
||||
integer i;
|
||||
record r;
|
||||
|
||||
r["integer"] = o_integer;
|
||||
r["real"] = o_;
|
||||
r["text"] = o_text;
|
||||
r["date"] = output_date;
|
||||
|
||||
i = 0;
|
||||
while (i < count()) {
|
||||
r[__type($i)]($i);
|
||||
o_byte('\n');
|
||||
i += 1;
|
||||
}
|
||||
}
|
||||
|
||||
integer
|
||||
main(void)
|
||||
{
|
||||
g("X.1", 707, .5, date().now);
|
||||
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue