Comparison of Basic Instructions of Programming Languages

From Unify Community Wiki
(Difference between revisions)
Jump to: navigation, search
(broke into multiple tables for easier reading)
(added "Other Non-Unity-Specific Variable Types")
Line 87: Line 87:
 
|  
 
|  
 
|  
 
|  
 +
|}
 +
 +
 +
=== Other Non-Unity-Specific Variable Types ===
 +
 +
<!-- This table would be tons easier to read if we had tables styles with cell borders and header cell support. -->
 +
{| style="margin: 1em; margin-left: 0; background: #f9f9f9; border: 1px #aaa solid;"
 +
|-
 +
! Language
 +
! [http://en.wikipedia.org/wiki/Boo_(programming_language) Boo]
 +
! [http://en.wikipedia.org/wiki/C_Sharp_(programming_language) C#]
 +
! UnityScript/[http://en.wikipedia.org/wiki/JavaScript JavaScript]
 +
|-
 +
! Text [http://en.wikipedia.org/wiki/Character_(computing) Character]
 +
| {{n/a}}
 +
| char
 +
| {{n/a}}
 +
|-
 +
! Text [http://en.wikipedia.org/wiki/String_(computer_science) String]
 +
| string
 +
| string
 +
| String
 +
|-
 +
! [http://en.wikipedia.org/wiki/Boolean_datatype Boolean])
 +
| bool
 +
| bool
 +
| Boolean
 +
|-
 +
! [http://en.wikipedia.org/wiki/Object_(computer_science) Object]/[http://en.wikipedia.org/wiki/Universal_type Universal])
 +
| object
 +
| object
 +
| Object
 
|}
 
|}
  

Revision as of 02:36, 3 August 2009

Basic instructions of the three high-level programming languages offered by Unity (JavaScript, C#, and Boo) are compared here.

Contents

Conventions of This Article

The bold is the literal code. The non-bold is interpreted by the reader. Statements in guillemets (« … ») are optional. tab indicates a necessary indent.


Comparison

The following tables compare code differences of the Unity programming languages. See also the Comparison of Programming Languages for general information.


Integer Type Identifiers

Language Boo C# UnityScript/JavaScript
8 bit (byte) Signed sbyte N/A
8 bit (byte) Unsigned byte N/A
16 bit (short integer) Signed short short N/A
16 bit (short integer) Unsigned ushort N/A
32 bit Signed int int N/A
32 bit Unsigned uint N/A
64 bit (long integer) Signed long long N/A
64 bit long integer) Unsigned ulong N/A


Floating Point Type Identifiers

Language Boo C# UnityScript/JavaScript
Single Precision single float N/A
Double Precision double double Number
Arbitrarily Precise (bignum) decimal


Other Non-Unity-Specific Variable Types

Language Boo C# UnityScript/JavaScript
Text Character N/A char N/A
Text String string string String
Boolean) bool bool Boolean
Object/Universal) object object Object



Programming Index

Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox