Touch Develop retirement postponed until June 22, 2019. Sign-in and access to cloud assets to be removed on May 23, 2018.Learn More..


hello world

This tutorial assumes that you have some basic programming experience with a language such as Java. We'll be looking at the classic hello world example.
function
main
()
"Hello world!" → post to wall
end function
Let's take a look at the statement that prints the text.
"Hello world!" → post to wall
  • The code is executed statement by statement as it is in Java.
  • String literals are enclosed in quotes "" as they are in Java.
  • Instead of a period (.), we use to separate identifiers.
  • The post to wall command is similar to println in Java: it prints the string to the screen (the screen is called wall).
  • Unlike Java, identifiers can use any characters. For example, post to wall contains white spaces. So avoidCamelCasing and simply use spaces!
Let's take a close look at the declaration of main:
function
main
()
...
end function
  • An action is the equivalent of a method in Java.
  • All actions are public by default so we can omit that keyword.
  • The main action has no input or output parameters so we can omit them from the signature.
  • Scope is denoted by indentation so there are no curly braces ({ }).
  • There are no user-defined classes so there is no class declaration!

Wait, there's more!

TouchDevelop is an environment built for touch, cloud-connected, mobile devices. Try one of the interactive tutorials to learn more about building UIs, cloud sessions and more!
You can also learn more about the TouchDevelop language and runtime at dev boot camp...