Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

Using String Variables

The other basic type of variable is the string, which stores a series of characters. Strings can be as simple as a single character; can be as complex as words, lines, or pages of text; or can even contain no characters at all. The following examples demonstrate different types of strings in the Message panel:

myString = "A"
put myString
-- "A"
myString = "Hello"
put myString
-- "Hello"
myString = "Hello World."
put myString
-- "Hello World."
myString = ""
put myString
-- ""


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial