Click 'Run' to go.
Here we look at a command called printLine. It will print the words that follow the command's label.
Click the Run button, and the program will print the quoted text. The printing will appear in the white printer area.
If you want to, you can change the words in the text box. Run the program after your changes, and you should see your new message printed.
There's more information below.
Quotes are used for printing text.
At EZ Programing Demos when words are shown to be printed, the words are placed within quotes. In the context of computer languages the group of words, or any text in general, placed between quotes is refered to as a string. It's called a string because it is a sting of characters. So, here would be a string:
"Have a good day."
Although it sounds a bit strange at first, because of the quotes you would call the following a string and not a number:
In another article you will notice that quotes are not used when printing variable values. Variable values are not words, as it turns out. That article is named 'Printing the value of a variable'. It shows how variable values are printed without quotes.
The word 'line' in the command printLine means that a new line for printing is created as a final step when this command is executed. The next article titled 'Printing words on several lines' clearly shows how this new line works.
Here we are using string literals. Words or numerals placed between quotes are called string literals. String literals are exactly what they appear to be. They are, literally, meant to represent the very words that you place between the quotes. They are not symbols that stand for something else, such as variables in a math problem do.
The quotes are said to delimit the string. Some languages delimit strings with single quotes, which look like apostrophes. Other languages, including our examples here, use double quotes. Double quotes would be the normal quotes one usually finds in written materials. And some languages let you choose to use single or double quotes for string literals, as long as you start and end the string with the same type.
Here is a flow chart for this simple program:
Here's how this program code could appear in an imaginary computer language:
Suggested next article: