View Single Post
Old Nov 24th, 2007, 1:17 AM   #5
blake_jl
Newbie
 
Join Date: Nov 2007
Posts: 14
Rep Power: 0 blake_jl is on a distinguished road
Re: Question Number 1

Quote:
Originally Posted by DaWei View Post
Suppose I read your second script to you one line at a time. When I said, "Print 27 lines" you wouldn't know how to do it, because you don't know how to print even one line.

On the other hand, if I let you read the script in advance, you know how to print one line, three lines, nine lines, and twenty-seven lines.

It's that simple. If your interpreter sees and understands the entire script before it's asked to execute any part of it, you're home free. If it doesn't, you aren't. It isn't magic; it's implementation.

You might want to read some basic "How it works" stuff for computers and computer languages and how they get the job done in a few but various ways.
Ill stop where I am in the book and take your advice. The book I'm reading did mention this topic at the start. Maybe I need to read that part again but for some reason or another I thought that because we were both using the same program (Python) everything else would also be the same. Eg. my interpreter understands the entire script before its asked to execute any part of it, so why doesn't the authors?

Google might help me.

Thanks again.
blake_jl is offline   Reply With Quote