Content deleted Content added
Yun Sun 423 (talk | contribs) |
Yun Sun 423 (talk | contribs) |
||
Line 6:
As an example, we show an Echo client–server application: The client sends a message to the server and the server returns the same message to the client, where it is appended to a list of received messages. The application is simple and self-contained, and – despite all the limitations of short and synthetic examples – it gives us the chance to demonstrate different MT languages side by side.
service echo() {
var input = <input type="text" />
Line 28:
ws.onmessage = function(event) { ws.send(event.value) }
}
</syntaxhighlight>
fun echo(item) server {
item
Line 48:
main()
</syntaxhighlight>
fun echo (item : string) = return item
|