Download Paper
Transcript
Multitarget .Net compiler for TouchDevelop
}
action concatenating_strings(s1: String) {
$s1 := $s1 || " appended to the string";
meta private;
}
action intensifying_a_color(c1: Color) {
$c1 := colors−>accent;
meta private;
}
action playing_with_time(dt1: DateTime) {
$dt1 := $dt1−>add_days(10);
meta private;
}
action changing_contact(contact1: Contact) {
$contact1 := social−>contacts("facebook")−>at(1);
meta private;
}
action test_parameter_passing() {
$x := 41;
$x−> post_to_wall;
code−>incrementing_number($x);
$x−> post_to_wall;
$b := true;
$b−> post_to_wall;
code−>flipping_boolean($b);
$b−> post_to_wall;
$s := "text";
$s−> post_to_wall;
code−>concatenating_strings($s);
$s−> post_to_wall;
$c := colors−>rand;
$c−> post_to_wall;
code−>intensifying_a_color(colors−>accent);
$c−> post_to_wall;
$dt := time−>now;
$dt−> post_to_wall;
code−>playing_with_time($dt);
$dt−> post_to_wall;
$contact := social−>contacts("facebook")−>at(0);
$contact−> post_to_wall;
code−>changing_contact($contact);
$contact−> post_to_wall;
}
var a : Picture {
is\_resource = true;
}
action go(aps1: Appointment_Collection, x1: Number, b1: Boolean, s1: String, aps2: DateTime,
aps3: Color) {
$aps3−> post_to_wall;
}
100