print() simply prints string into Cows' output, followed by a newline. In other words, the print()
function behaves like echo() but adds a newline character
after its output.
String can be any valid expression:
print ("literal string");
print (variable);
print (variable_1 + variable_2);
The following script displays a quotation; please note that we don't need to include
newlines since print() adds them after each string.
print ("If you could see or feel the suffering you wouldn't");
print ("think twice. Give back life. Don't eat meat.");
print ("-- Kim Basinger");
This is Cows' output:
If you could see or feel the suffering you wouldn't think twice. Give back life. Don't eat meat. -- Kim Basinger
Strings are passed as variables.
quote = "Animals are my friends... and I don't eat my friends."; author = "-- George Bernard Shaw"; print (quote); print (author);
This is Cows' output:
Animals are my friends... and I don't eat my friends. -- George Bernard Shaw
This manual can be downloaded from http://www.g-cows.org/.