Free Republic
Browse · Search
General/Chat
Topics · Post Article

To: tacticalogic
I was under the impression a interpreter executed script code as it was read.

That's correct - that is a run-time compiler. The code is interpreted and "compiled" into machine code - usually line by line - at run time. Whereas a compiled program is one that has been previously compiled and stored in executable machine code (e.g., .exe on windows OS), for a particular hardware/OS configuration.

A "compiled program" doesn't require the services of .net, or python, or etc., to be running in the background. It has everything necessary, compiled into machine code, needed to interact directly with the CPU.

63 posted on 12/28/2015 5:21:59 PM PST by amorphous
[ Post Reply | Private Reply | To 62 | View Replies ]


To: amorphous
directly with the CPU OS.
64 posted on 12/28/2015 5:24:13 PM PST by amorphous
[ Post Reply | Private Reply | To 63 | View Replies ]

To: amorphous
That doesn't seem to be the case with PS. The entire script is run through the complier before any code is executed.

This seems to produce faster running code, but imposes some "gotchas", as variable binding within script blocks happens at compile time before variables are populated. Variable types that are passed by value will be null if you don't re-close the script block over the variables at run time.

65 posted on 12/28/2015 5:29:25 PM PST by tacticalogic ("Oh bother!" said Pooh, as he chambered his last round.)
[ Post Reply | Private Reply | To 63 | View Replies ]

Free Republic
Browse · Search
General/Chat
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson