WEEK9 - Week9 ClicktoeditMastersubtitlestyle...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
Click to edit Master subtitle style  3/14/11  Dr. Lale T. Ergene Week 9 Control over Input/Output
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
 3/14/11  Dr. Lale T. Ergene 22 More Control over INPUT and OUTPUT ( I/O ) The input and output facilities of any programming language are extremely important, because communication  between the user and the program is carried  out through these features. provides facilities for input and output at two  quite different levels.
Background image of page 2
 3/14/11  Dr. Lale T. Ergene 33 More Control over INPUT and OUTPUT ( I/O ) The list-directed input and output statements that  we have been using so far provide the capability  for straightforward input from the keyboard and  output to the display or printer. These list-directed “ I/O ” - statements, allow the  user very little control over the source or layout of  the input data.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
 3/14/11  Dr. Lale T. Ergene 44 allows the programmer, o to specify exactly how the data will be presented and interpreted, from which of the available input units it is to be read o how the results are to be displayed o  to which of the available output units the results are to be sent. More Control over INPUT and OUTPUT ( I/O )
Background image of page 4
 3/14/11  Dr. Lale T. Ergene 55 Interface between the  USER  and the  COMPUTER Considering the following 9 – digit input data there  are enormous number of possible interpretations : Data : 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1, 2, 3, 4, 5, 6, 7, 8, and 9 123, 456, 789 12345 . 6789 1.23, 0.45, 67, 8900
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
 3/14/11  Dr. Lale T. Ergene 66 FORMAT and EDIT DESCRIPTORS An input (read) statement must contain three distinct types of information o where the data is to be found o where it is to be stored in the computer’s memory o how it is to be interpreted Similarly, an output (print or write) statement must define o where the results are currently stored o  where they are to be sent
Background image of page 6
 3/14/11  Dr. Lale T. Ergene 77 FORMAT and EDIT DESCRIPTORS The input (read) and output (print or write) statements have taken the following forms up to now: read *, input_list print *, output_list The asterisk indicated that the format to be used is a list-directed format . The new format will be called an embedded format  because it appears as a part of read and print statement read “(edit descriptors)”, input_list
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
 3/14/11  Dr. Lale T. Ergene
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 28

WEEK9 - Week9 ClicktoeditMastersubtitlestyle...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online