Strings


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

Strings are objects representing text. A string is defined either with a single quote or a double quotes.

## this is a comment and will not be executed.

# define a string between quotes
# can be a single quote ' or a double quote "

print "this is a string"

print 'this is also a string'

print """this is a multi-line string
an other line in the string"""

print '''this is also a multi-line string
an other line in the string'''

print "a 'single quote' can be in a string declared with double quotes"

print 'a "double quote" can be in a string declared with a single quote'

Open this script in RoboFont.