This chapter contains two main topics--strings and text files--and shows how they are used, as well as several ways in which they are related.
In this chapter, you will see that a string is just an array of characters and that Ada provides a number of special operations, such as slicing and concatenation, to deal with strings. There are also some standard Ada 95 libraries to deal with character and string translations and variable-length strings.
You will also see more examples of how to use files of data with your programs. You will learn to enter program data from data files and save program output on output files. Using data files frees you from having to reenter test data continually while debugging a program. Using output files enables you to save output on disk rather than to simply view it on the screen. Input and output redirection allows you to specify, on the command line, the names of disk files to be used instead of the keyboard and the screen.
Finally, you will learn about the Ada 95 command line package, which provides a standard way to get input arguments from the operating system command line.
Copyright © 1996 by Addison-Wesley Publishing Company, Inc.