Math


Warning: mysql_real_escape_string(): Access denied for user ''@'localhost' (using password: NO) in /home/frelaen/webapps/robofontdoc/wp-content/plugins/github-code-viewer-2/GitHub_Code_Viewer.php on line 116

Warning: mysql_real_escape_string(): A link to the server could not be established in /home/frelaen/webapps/robofontdoc/wp-content/plugins/github-code-viewer-2/GitHub_Code_Viewer.php on line 116

## Math

# math with numbers
print 10 + 5      # adding
print 10 - 5      # subtracting
print 10 * 5      # multiplying
print 10 / 5      # dividing

print 5 // 2      # integer division
print 5 % 2       # modulo

print 4 ** 2      # the power of

# math with strings
# (only adding string with a string and multiplying with a integer)
print "hello" + "world" 
print "hello" * 5 

# this will make an error and print out a traceback
print "hello" + 5

Open this script in RoboFont.