On 31/03/2012 06:56, Lie Ryan wrote:
On 03/18/2012 12:36 PM, Steven D'Aprano wrote:
 On Sat, 17 Mar 2012 20:59:34 +0100, Kiuhnm wrote:
 In the second example, most English speakers would intuit that "print(i)"
 prints i, whatever i is.

There are two points where the code may be misunderstood, a beginner may
think that "print i" prints to the inkjet printer (I remembered
unplugging my printer when I wrote my first BASIC program for this
reason); and the possible confusion of whether "print i" prints the
letter "i" or the content of variable "i". (Fortunately, this confusion
are easily resolved when I run the code and see the result on-screen
instead of a job on the print spooler)

(ironically, although print is nowadays a programming jargon for
outputting to screen, but in the old dark ages, people used to use the
"print" statement to print to paper in their old terminal)

I remember a review of a machine back in the early 1980s or late 1970s.
The machine used BASIC, but the reviewer was surprised when the printer
sprang into life. "PRINT" meant "send to printer"; in order to 'print'
to the screen you used "DISPLAY". (The more common method was to use
"LPRINT" for sending to the printer.)
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to