Main method
Fortress
component Foo
export Executable
  run(args:String...) = do
    println "main"
  end
end
Java
public class Foo{
	public static void main(String[] args){
		System.out.println("main");
	}
}
C
int main(int argc, char ** argv){
	printf("main\n");
}
Ruby Not needed
Python Not needed
Javascript Not needed
PHP Not needed
Perl Not needed
Ocaml Not needed
Scheme Not needed
Pascal
begin;
	writeln('main');
end.

Basic expressions
Fortress
2 2
1 + 1
"foo" "bar"
true AND false
true OR false
Java
2 * 2
1 + 1
"foo" + "bar"
true && false
true || false
C
2 * 2
1 + 1
char * foo = "foo"; char * bar = "bar"; char temp[16]; sprintf( temp, "%s%s", foo, bar );
1 && 0
1 || 0
Ruby
2 * 2
1 + 1
"foo" + "bar"
true and false
true or false
Python
2 * 2
1 + 1
"foo" + "bar"
True and False
True or False
Javascript
2 * 2
1 + 1
"foo" + "bar"
true && false
true || false
PHP
2 * 2
1 + 1
"foo" . "bar"
true && false
true || false
Perl
2 * 2
1 + 1
"foo" . "bar"
true && false
true || false
Ocaml
2 * 2
1 + 1
"foo" ^ "bar"
true && false
true || false
Scheme
(* 2 2)
(+ 1 1)
(string-append "foo" "bar")
(and #t #f)
(or #t #f)
Pascal
2 * 2
1 + 1
'foo' + 'bar'
true and false
true or false