Download
icm class 9 n.
Skip this Video
Loading SlideShow in 5 Seconds..
ICM Class 9 PowerPoint Presentation
Download Presentation
ICM Class 9

ICM Class 9

123 Vues Download Presentation
Télécharger la présentation

ICM Class 9

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. ICM Class 9 Strings and Text

  2. Text in the Arts “Cut right through the pages of any book or newsprint… lengthwise for example, and shuffle the columns of text. Put them together at hazard and read the newly constructed message.”

  3. Eliza • 1966 Joseph Weizenbaum invents Eliza - 1st chatbot - Used very simple scripts for compelling interaction • Included in EMACS

  4. Racter 1983 A hot and torrid bloom Which fans wise flames And begs to be redeemed by forces black and strong Will now oppose my naked will And force me into regions of despair More than iron More than lead More than gold I need electricity I need it more than I need lamb or pork or lettuce or cucumber I need it for my dreams

  5. Don Waber’s “Strings” • Brian Kim Stefans’ “Dreamlife of letters”

  6. Characters • What is a character? • ‘a’ • ‘1’ • ‘@’

  7. Characters • ‘a’ = 97 • ‘1’ = 49 • ‘@’ = 64

  8. Characters • char class maps integers to alphanumeric representations

  9. Strings • English characters represented by ASCII

  10. Characters • All characters are unicode

  11. Strings • Strings are collections of multiple chars: • Cat • Dog • !@#$RAT#@ • 123

  12. Strings • char[] string = {‘c’, ‘a’, ‘t’};

  13. Strings • String s = “cat”;

  14. Strings • charAt / indexOf • Length • equals • subString • +

  15. Strings • Much much more online

  16. Text • Displaying text

  17. Text • text(<string>, x, y);

  18. Text • PFont • textFont(<PFont>)

  19. Text • To display Unicode text you need the codes

  20. Text • PFont • textFont(<PFont>)

  21. Files • loadStrings • printWriter

  22. Files • loadStrings can take a URL instead of a local file

  23. Directories • Paths • /Users/heatherdewey-hagborg/…