Difference between revisions of "Syntax Comparison"
From mi-linux
Jump to navigationJump to search (Basic page structure in) |
|||
Line 19: | Line 19: | ||
| <pre>/* comment */</pre> | | <pre>/* comment */</pre> | ||
| Doesn't have multi-line comments. | | Doesn't have multi-line comments. | ||
− | + | |- | |
+ | |'''Null object''' | ||
+ | | <pre>NULL</pre> | ||
+ | | <pre>null</pre> | ||
+ | | <pre>TODO</pre> | ||
+ | | <pre>None</pre> | ||
+ | |- | ||
+ | |'''+,-,*,/,%,*''' | ||
+ | | <pre>+,-,*,/,%,*</pre> | ||
+ | | <pre>+,-,*,/,%,*</pre> | ||
+ | | <pre>+,-,*,/,%,*</pre> | ||
+ | | <pre>+,-,*,/,%,*</pre> | ||
+ | |- | ||
+ | |'''True and false''' | ||
+ | | <pre>TRUE, FALSE</pre> | ||
+ | | <pre>true, false</pre> | ||
+ | | <pre>TODO</pre> | ||
+ | | <pre>True, False</pre> | ||
+ | |- | ||
+ | |'''Boolean operators''' | ||
+ | | <pre>&&, ||, !</pre> | ||
+ | | <pre>&&, ||, !</pre> | ||
+ | | <pre>TODO</pre> | ||
+ | | <pre>and, or, not</pre> | ||
+ | |- | ||
+ | |'''Relational operators''' | ||
+ | | <pre><, >, <=, >=, ==, !=</pre> | ||
+ | | <pre><, >, <=, >=, ==, !=</pre> | ||
+ | | <pre><, >, <=, >=, ==, !=</pre> | ||
+ | | <pre><, >, <=, >=, ==, !=</pre> | ||
|} | |} | ||
Line 32: | Line 61: | ||
!Python | !Python | ||
|- | |- | ||
− | |''' | + | |'''TODO''' |
− | | <pre> | + | | <pre>TODO</pre> |
− | | <pre> | + | | <pre>TODO</pre> |
− | | <pre> | + | | <pre>TODO</pre> |
− | | <pre> | + | | <pre>TODO</pre> |
|} | |} | ||
Line 48: | Line 77: | ||
!Python | !Python | ||
|- | |- | ||
− | |''' | + | |'''TODO''' |
− | | <pre> | + | | <pre>TODO</pre> |
− | | <pre> | + | | <pre>TODO</pre> |
− | | <pre> | + | | <pre>TODO</pre> |
− | | <pre> | + | | <pre>TODO</pre> |
|} | |} | ||
Line 64: | Line 93: | ||
!Python | !Python | ||
|- | |- | ||
− | |''' | + | |'''TODO''' |
− | | <pre> | + | | <pre>TODO</pre> |
− | | <pre> | + | | <pre>TODO</pre> |
− | | <pre> | + | | <pre>TODO</pre> |
− | | <pre> | + | | <pre>TODO</pre> |
|} | |} | ||
Line 80: | Line 109: | ||
!Python | !Python | ||
|- | |- | ||
− | |''' | + | |'''TODO''' |
− | | <pre> | + | | <pre>TODO</pre> |
− | | <pre> | + | | <pre>TODO</pre> |
− | | <pre> | + | | <pre>TODO</pre> |
− | | <pre> | + | | <pre>TODO</pre> |
|} | |} | ||
Line 96: | Line 125: | ||
!Python | !Python | ||
|- | |- | ||
− | |''' | + | |'''TODO''' |
− | | <pre> | + | | <pre>TODO</pre> |
− | | <pre> | + | | <pre>TODO</pre> |
− | | <pre> | + | | <pre>TODO</pre> |
− | | <pre> | + | | <pre>TODO</pre> |
|} | |} | ||
Line 112: | Line 141: | ||
!Python | !Python | ||
|- | |- | ||
− | |''' | + | |'''TODO''' |
− | | <pre> | + | | <pre>TODO</pre> |
− | | <pre> | + | | <pre>TODO</pre> |
− | | <pre> | + | | <pre>TODO</pre> |
− | | <pre> | + | | <pre>TODO</pre> |
|} | |} | ||
Line 128: | Line 157: | ||
!Python | !Python | ||
|- | |- | ||
− | |''' | + | |'''TODO''' |
− | | <pre> | + | | <pre>TODO</pre> |
− | | <pre> | + | | <pre>TODO</pre> |
− | | <pre> | + | | <pre>TODO</pre> |
− | | <pre> | + | | <pre>TODO</pre> |
|} | |} |
Revision as of 19:04, 23 January 2011
Basics
PHP | Java | Scala | Python | |
---|---|---|---|---|
Single line comment | // comment |
// comment |
// comment |
# comment |
Multi-line comment | /* comment */ |
/* comment */ |
/* comment */ |
Doesn't have multi-line comments. |
Null object | NULL |
null |
TODO |
None |
+,-,*,/,%,* | +,-,*,/,%,* |
+,-,*,/,%,* |
+,-,*,/,%,* |
+,-,*,/,%,* |
True and false | TRUE, FALSE |
true, false |
TODO |
True, False |
Boolean operators | &&, ||, ! |
&&, ||, ! |
TODO |
and, or, not |
Relational operators | <, >, <=, >=, ==, != |
<, >, <=, >=, ==, != |
<, >, <=, >=, ==, != |
<, >, <=, >=, ==, != |
Selection
PHP | Java | Scala | Python | |
---|---|---|---|---|
TODO | TODO |
TODO |
TODO |
TODO |
Iteration
PHP | Java | Scala | Python | |
---|---|---|---|---|
TODO | TODO |
TODO |
TODO |
TODO |
Compound types (arrays, lists, etc)
PHP | Java | Scala | Python | |
---|---|---|---|---|
TODO | TODO |
TODO |
TODO |
TODO |
Input / output
PHP | Java | Scala | Python | |
---|---|---|---|---|
TODO | TODO |
TODO |
TODO |
TODO |
Exception handling
PHP | Java | Scala | Python | |
---|---|---|---|---|
TODO | TODO |
TODO |
TODO |
TODO |
Dealing with types
PHP | Java | Scala | Python | |
---|---|---|---|---|
TODO | TODO |
TODO |
TODO |
TODO |
Classes, objects, methods, etc
PHP | Java | Scala | Python | |
---|---|---|---|---|
TODO | TODO |
TODO |
TODO |
TODO |