Hi Jim, That's because the executable doesn't need everything included in your source file. As I mentioned to Phil we do a lot of things to make source code human readable like double spacing between functions, commenting a line so what we know this line of text does, indenting programs so we can see which are inner and outer blocks of code, etc. Even things like functions, variables, braces, brackets, etc are stripped once converted into machine language.
None of these things are needed because all your CPU understands is pulses of ons and offs or in machine languages ones and zeroes. A compiler goes through your code line by line, ignores everything that is irrelevent, and then converts the remaining code into thousands of ones and zeros, binary language, that your CPU understands. As a result most of the stuff we see on screen when programming is stripped away leaving only the essential memory locations and strings of binary that represents instructions thus making the binary far smaller than our source code. Cheers! On 2/17/12, Jim Kitchen <[email protected]> wrote: > was Python and Interactive Fiction > Hi Phil, > > Hmmm, that is very interesting that the rem statements don't seem to change > the compiled executable file size. I might have to experiment with that. > > I do know even though I am not sure why, that the size of the source code > doesn't always correspond perfectly with the compiled executable size > either. I don't know if it might be different commands, or amount of text > or what exactly, but I have noticed by looking at the source code files and > then the executable files that it doesn't always match up. Below the frm > files are the source code files and of course the exe are the executable > files. > > spanker exe 163,840 10/04/2010 11:00 AM > tjs exe 229,376 05/12/2010 11:00 AM > casino exe 237,568 02/02/2004 12:00 PM > STARMULE EXE 237,568 08/17/2003 11:00 AM > puppy1 exe 241,664 08/05/2008 11:00 AM > golf exe 303,104 03/19/2007 12:00 PM > baseball exe 335,872 09/08/2007 11:00 AM > mach1tts exe 368,640 10/04/2009 11:00 AM > awesome exe 462,848 08/08/2011 11:00 AM > monopoly exe 483,328 12/02/2008 12:00 PM > > starmule frm 43,936 08/11/2003 02:28 PM > puppy1 frm 68,827 08/05/2008 03:19 AM > spanker frm 70,513 10/04/2010 04:57 AM > casino frm 71,230 02/02/2004 03:10 AM > tjs frm 76,000 05/12/2010 08:48 AM > baseball frm 99,777 09/07/2007 06:56 PM > golf frm 106,412 03/19/2007 04:34 AM > awesome frm 160,225 08/08/2011 05:47 AM > monopoly frm 163,208 11/24/2008 06:02 PM > mach1tts frm 163,709 10/04/2009 03:42 AM > > Jim --- Gamers mailing list __ [email protected] If you want to leave the list, send E-mail to [email protected]. You can make changes or update your subscription via the web, at http://mail.audyssey.org/mailman/listinfo/gamers_audyssey.org. All messages are archived and can be searched and read at http://www.mail-archive.com/[email protected]. If you have any questions or concerns regarding the management of the list, please send E-mail to [email protected].
