Difference between revisions of "W1206 Expression Evaluation vs Printing"

From Coder Merlin
(Created page with "thumb|right|link=|Epson MX-80 == Prerequisites == * W1205 Function Introduction == Introduction == '''Printing''' refers to sending a stream of da...")
 
Line 1: Line 1:
[[File:Epson MX-80.jpg|thumb|right|link=|Epson MX-80]]
[[File:Epson MX-80.jpg|thumb|right|link=|Epson MX-80]]
[[File:Nixdorf PC 8810-25 - Front-open.jpg|thumb|right|link=|Nixdorf PC 8810-25]]
== Prerequisites ==
== Prerequisites ==
* [[W1008 Merlin Mission Manager]]
* [[W1205 Function Introduction]]
* [[W1205 Function Introduction]]
* [[W1037 Expressions]]
== Introduction ==
== Introduction ==
'''Printing''' refers to sending a stream of data, most often text but sometimes binary data as well, to an output device.  Frequently this device is simply the '''console'''.  The ''console'' refers to the input and output devices used to interact with a computer.  It's usually comprised of a screen and keyboard, and sometimes a type of pointing device.   
'''Printing''' refers to sending a stream of data, most often text but sometimes binary data as well, to an output device.  Frequently this device is simply the '''console'''.  The ''console'' refers to the input and output devices used to interact with a computer.  It's usually comprised of a screen and keyboard, and sometimes a type of pointing device.   


Printing is important not only for interacting with humans, but with other computing systems.  For example, you've already had a lot of experience in interacting with {{MMM}} through print statements.  
Printing is important not only for interacting with humans, but with other computing systems.  For example, you've already had a lot of experience in interacting with the {{MMM}} through print statements.  
== Expression Evaluation ==
== Expression Evaluation ==
 
As we learned earlier, there are many different types of expressions, including integer, floating point, and Boolean.  Expressions, when evaluated, yield a specific value.  But, ''the evaluation of an expression'' is very different from printing.  This can sometimes be confusing, because when using an environment such as a REPL, the results of expressions are ''automatically'' printed to the console.  In a ''real'' program, however, this does not occur.  Let's examine a few examples.
== Key Concepts ==
== Key Concepts ==
== Exercises ==
== Exercises ==
== References ==
== References ==

Revision as of 20:44, 16 November 2019

Within these castle walls be forged Mavens of Computer Science ...
— Merlin, The Coder
Epson MX-80
Nixdorf PC 8810-25

Prerequisites[edit]

Introduction[edit]

Printing refers to sending a stream of data, most often text but sometimes binary data as well, to an output device. Frequently this device is simply the console. The console refers to the input and output devices used to interact with a computer. It's usually comprised of a screen and keyboard, and sometimes a type of pointing device.

Printing is important not only for interacting with humans, but with other computing systems. For example, you've already had a lot of experience in interacting with the  Merlin Mission Manager  through print statements.

Expression Evaluation[edit]

As we learned earlier, there are many different types of expressions, including integer, floating point, and Boolean. Expressions, when evaluated, yield a specific value. But, the evaluation of an expression is very different from printing. This can sometimes be confusing, because when using an environment such as a REPL, the results of expressions are automatically printed to the console. In a real program, however, this does not occur. Let's examine a few examples.

Key Concepts[edit]

Exercises[edit]

References[edit]