Created
June 29, 2010 10:48
-
-
Save solon/457068 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# WIP of http://wiki.processing.org/w/Ruby_Comparison | |
# Based on http://wiki.processing.org/w/Python_Comparison | |
# todo: | |
# - write intro paragraph on Ruby | |
# - add more examples | |
# - add a separate RubyProcessing_Comparison wiki entry for ruby-processing | |
# [http://wiki.github.com/jashkenas/ruby-processing/] | |
# Data | |
x = 70 # Initialize | |
x = 30 # Change value | |
x = 70.0 | |
x = 30.0 | |
a = [5, 10, 11] # Create an array | |
a[0] = 12 # Reassign | |
# Control | |
while true | |
# Statements | |
end | |
if c == 1 | |
# Statements | |
end | |
if c.equal?(1) | |
# Statements | |
end | |
if c != 1 | |
# Statements | |
end | |
if c < 1 | |
# Statements | |
end | |
if c >= 1 | |
# Statements | |
end | |
if c != 1 | |
# Statements | |
end | |
if c >= 1 and c < 20 | |
# Statements | |
end | |
if c >= 20 | |
# Statements | |
elsif x == 0 | |
# Statements | |
else | |
# Statements | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment