Douglas Alan wrote:
[snip]
C++ also allows for reading from stdin like so:

   cin >> myVar;

I think the direction of the arrows probably derives from languages
like APL, which had notation something like so:

     myVar <- 3
     [] <- myVar

"<-" was really a little arrow symbol (APL didn't use ascii), and the
first line above would assign the value 3 to myVar. In the second
line, the "[]" was really a little box symbol and represented the
terminal.  Assigning to the box would cause the output to be printed
on the terminal, so the above would output "3".  If you did this:

     [] -> myVar

It would read a value into myVar from the terminal.

APL predates Unix by quite a few years.

No, APL is strictly right-to-left.

    -> x

means "goto x".

Writing to the console is:

    [] <- myVar

Reading from the console is:

    myVar <- []
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to