So, we get things in with
. How do we get things out? With the
function. This function takes the values within its parentheses and puts them out without any embellishment onto
. Once again, unless you've done something odd, this will be your command console. For example:
print("hello world\n"); # say hello world, followed by newline
print "hello world\n"; # same thing
Note that the second example shows the form of
without parentheses. In fact, many of the operators that look like functions also have a syntactic form that works without the parentheses. Whether or not to use the parentheses is mostly a matter of style and typing agility, although there are a few cases where you'll need the parentheses to remove ambiguity.
We'll see that you can actually give
of values, in the
"Using print for Normal Output"
, but we haven't talked about lists yet, so we'll put that discussion off until later.