Syntax Comparison

From mi-linux
Revision as of 17:13, 23 January 2011 by In0316 (talk | contribs) (Basic page structure in)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Basics

PHP Java Scala Python
Single line comment
// comment
// comment
// comment
# comment
Multi-line comment
/* comment */
/* comment */
/* comment */
Doesn't have multi-line comments.


Selection

PHP Java Scala Python
Single line comment
// comment
// comment
// comment
# comment

Iteration

PHP Java Scala Python
Single line comment
// comment
// comment
// comment
# comment

Compound types (arrays, lists, etc)

PHP Java Scala Python
Single line comment
// comment
// comment
// comment
# comment

Input / output

PHP Java Scala Python
Single line comment
// comment
// comment
// comment
# comment

Exception handling

PHP Java Scala Python
Single line comment
// comment
// comment
// comment
# comment

Dealing with types

PHP Java Scala Python
Single line comment
// comment
// comment
// comment
# comment

Classes, objects, methods, etc

PHP Java Scala Python
Single line comment
// comment
// comment
// comment
# comment