Will Rickards WT said:Handruin said:I also don't understand the compilers. I take it you use compilers for different OS's and different systems. But what are the advantages from using an MS compiler vs. a Borland? Can you use one or the other, or does it depend on which programming tool you use, such as MS visual C++, or Borland C++.
Let us start with the basics.
There are 'levels' of languages. These are really just levels of abstraction from the machine code they eventually get translated into.
At the lowest level is of course machine code, you know the 1s and 0s. At this level you are platform (processor) specific. A processor family has a given instruction set. These are simple commands like add, compare, and store. You work with the memory on the processor called registers.
Still at the pretty raw level you have assembly languages. They are a bit less cryptic since they are something like english words instead of 1s and 0s. However you are still working with simple instructions and registers. An assembly language program gets sent through an assembler which turns it into machine code. This is almost a 1 to 1 translation.
Then you have languages like C. The syntax is more abstracted but it does essentially get translated into machine code. However at this stage you need a compiler and a linker. A compiler parses your code and turns it into object code. This is like machine code but not in an executable form. To be executable it has to be linked. What linking does is resolve the references found in the object code to the libraries. These libraries can be standard C libraries or user created libraries. Once all the references are in place an executable can be created.
So since compiling/linking still generates machine code. It is specific to an OS and processor family. This is why languages like Java and the concept of a virtual machine were created. You code for a virtual machine and it handles translation to actual machine code.
There are standards for languages like C++. A compiler may not adhear to the standard completely. Thus even though you are programming in C++, some language constructs or standard libraries may not be available to you because of your choice of compilers. This is the difference between MS and Borland compilers. Mainly a difference in compatibility with the standard and optimization techniques.
When programming in windows you generally use some sort of IDE (Integrated Development Environment) as Tannin said. And yes I still have Turbo Pascal disks lying around. Since it is integrated the compiling and linking stage is mostly transparent to you. So your choice of IDE will determine the compiler you use. You could write code in the IDE editor and then compile it using another compiler.
Handruin said:Now I see the link for something like razorlame and wonder how one or more languages can produce a GUI that fits in like a Windows app. If you aren't using MS C++, how do you create a windows based application and make it "look" like a windows application. Are there GUI based editors that allow you to design how the application looks? Is this something that is done after the code is written?
Windows has a set of libraries. These expose standard functions and definitions. It is generally called the Windows API (application programming interface). Languages can access these APIs directly (function calls to API functions in your code) or indirectly (the compiler translates other statements into calls to those functions).
I don't want to get into how windows makes a window but to answer your question, yes there are GUI editors to design windows. The presence of these editors has been termed visual. Thus Visual C++ has a GUI based window editor. There are many types of windows and they go by different names. Visual Basic for example uses forms and has a forms editor.
These editors generate code that creates the windows. In some you see that code (VC), in others (VB) it is hidden. After this code is created you write the code that handles the different window interactions, like clicking buttons and entering text.
I thank you for the good explanation to satisfy my ignorance in the software world. Some of what you explained wasn’t very clear, but it is now its getting better. I’ve spent the last week learning how to script and understand some more of the basics. Friday night I was proud of myself, I had created my own complicated function with the forethought to allowing me to reuse the code for future tasks. To some people it is probably simple, but I was happy to now understand the concept of passing information in and out of functions.
Today I started to explore arrays a bit more. I’ve been asking help from a guy at work who knows his stuff. He’s been helping me to understand how to extract information out of arrays in a way that I can “search” through it. This now brings me into the “for” and “while” conditions, along with some more if/then/else. I understood how these items worked in the past, but to be able to implement them into something useful is a whole new concept.
Today I asked if I could use the Visual Studio 6.0 (enterprise edition) to learn, so now sitting before me is 5 CD-ROM’s to install on my work laptop. I also have the MSDE for visual studio, macro assembler, and C++ 1.2. I have no idea what I*’m getting myself into, but for now I can tinker with this studio set until I decide what route I want to go.
I also have some tutorial software that bulldog gave me to learn from which has C++ and java in it.
I’m excited to see what I can learn and do with these tools! Thanks for all the help so far, I’m sure I’ll have more questions as time goes by.