Saturday, April 14, 2007

 

Turing, Ch. 10 and 11

    Chapter 10 is short and simple. You learn
  1. how to get input from a text file (rather than from the keyboard) using Run With Args on the menu bar
  2. how to output to a text file (rather than to the screen)
  3. how to use the end-of-file (eof) marker when getting input from a file
  4. how to get an entire line of input at once (rather than one word at a time)

    Don't spend too much time on Chapter 10. Try the programs in the textbook, learn how to use files, then move on to Chapter 11. There will NOT be a test on Chapter 10. You need to know it for later chapters.


Chapter 11 (Handling Strings) gets quite interesting. There will be a couple of small sections that require you to concentrate, but if you get the basic tools down at the beginning, it will not be a problem.

    The first part of the chapter shows you several basic tools for manipulating strings in Turing.
  1. finding the length of a string with length()
  2. joining (catenating) strings with the + operator
  3. selecting part of a string, e.g. word (4..6)
  4. searching for a pattern in a string e.g. index ("dandelion", "lion")


This page is powered by Blogger. Isn't yours?