Click to See Complete Forum and Search --> : Program Question


jfesler
March 29th, 2001, 08:31 AM
Can someone tell me what the difference is between: Object Program and Source Program.

Thanks!

SubZero
March 29th, 2001, 10:02 AM
The object is the compiled version *PGM or on a PC it would be the .exe

The source is the actual file containing the source code.

I'm just using references from the AS/400, so correct me if I'm wrong.

dead
March 31st, 2001, 05:00 AM
I would agree with QSECOFR.

mahdi
March 31st, 2001, 09:50 AM
Isn't Object Oriented programming the use of pre-built libraries? Like Visual Basic or Visual C++?

SubZero
March 31st, 2001, 11:36 AM
(OOP) The use of a class of programming languages and techniques based on the concept of an "object" which is a data structure (abstract data type) encapsulated with a set of routines, called "methods", which operate on the data.

Platypus
April 1st, 2001, 09:02 AM
This may or may not help, from my DOS programming days. Are you referring to Source Code and Object Code? If so, as said before the Program Source Code is the instruction sequence written in the programming language, which is then compiled with a Compiler.

The compiler may produce an executable file directly, if all the instructions used can be translated directly to machine code. If any instructions use calls to an external library, the compiler cannot resolve those, and will produce a file containing Object Code. This is not directly executable, since it refers to machine code contained in a library file. The Object File must then be processed by a Linker, which will assemble an executable which either contains the code drawn from the library file, or looks for the library when run (the Dynamic Link Library - DLL - principle).

If this is not what you are asking about, ignore this ramble. I just miss programming.

Mach5
April 1st, 2001, 02:39 PM
This example you gave is useful for languages as DOS Pascal and Clipper, where the compiling (translate to machine language) and linkediting (link of the external sources of code (libraries) to the object code) processes were separated. (in Pascal compilers, maybe the programming environment could do both processes in one command, but they were 2 separated procedures.

So, you (cheetah) have (at least) three answers:

- for DOS languages, the source code is the code you typed; and the object code is the compiled (machine-language translated) version of a program, but not ready to run.
- for AS/400 environment, the source code is still the code you typed, and the object code is the compiled version, too. On this, usually is not necessary the linkediting process, because all the libraries used for programming are available (as a mainframe system) for all programs.
- for Visual languages (as VB or Delphi) object code could be the code "tied" with the objects you use for creating a program, and the source code could be the code you store in "modules". In these environments, the concept of code in objects and code in modules is some confused to understand.

Excuse me for the long message!

Greetings,

~torn~
April 6th, 2001, 09:48 PM
QSECOFR is correct. I write RPG on the AS/400 but am a newbie. You first must create the source, debug & compile, when the compile completes you have your object.

SubZero
April 6th, 2001, 10:50 PM
I'm just glad to see that I'm not the only AS/400 guy here! Where I work, we run over 1000 COBOL, and about 12 RPG progs.

Originally posted by ~torn~:
QSECOFR is correct. I write RPG on the AS/400 but am a newbie. You first must create the source, debug & compile, when the compile completes you have your object.

opiate
April 7th, 2001, 06:44 PM
Object Programming is mostly coded with C++ or VB.

Object Programming is an Object

Think of a Coffey Machine.

The Coffey Machine contains Properties and Methods.

Properties are the whay it looks, the size, the color, the name, the way it operates for methods like, temprature, water level, type of coffey, etc etc...

Methods are operations that the Coffey Machine can do. monitor temp, set the alarm, monitor water level, turn on, turn off, etc etc...

Source Code is just code: Meaning the lanuage you use to program your app or what ever. Every program has source code. The source code is what is compiled making an .exe, .dll, .ocx, etc etc...