Mark44
Mentor
- 38,030
- 10,506
What you're calling subroutines are functions. Both Fortran and Pascal distinguish between blocks of code that return a value (functions) and blocks of code that perform some action (subroutines in Fortran and procedures in Pascal).yungman said:So those are not called subroutines, they called declarations or prototypes of the functions now a days?
Some additional terminology that is used in object-oriented languages is method, a function that is associated with a particular class.
Here is an example of a function prototype. The prototype (or declaration) provides the name of the function (triangleArea), the number of parameters (four) and types of the parameters (all are type double), and the type of value returned (double)
C:
double triangleArea(double sp, double a, double b, double c);
C:
double triangleArea(double sp, double a, double b, double c)
{
double area = std::sqrt(sp * (sp - a) * (sp - b) * (sp - c));
return area;
}
The Include folder contains the standard library header files. If you write your own header files, you could add them to the Include folder, but this is not a good idea. Usually any user-written header files would be placed in the same folder as the source code for your program.yungman said:The Include folder, in the C drive is called "Header files"?
An application (called a solution in VS) can consist of a number of projects, but at your stage of learning, an application will involve only one project. Building an application entails compiling the code your wrote, which translates the code that you wrote to machine code, and then linking any library code together with your object file. The net result of this is usually an executable (.exe extension), but it's also possible to create a static library file (.lib extension) or a dynamic library (.dll extension). These library files are containers of function code that can be linked into programs that you write.yungman said:I am trying to learn the new names which is very important to understand what I am reading. I find Google is very good at that. I read about Solutions, Build solution, Clean Solution. These are all new to me. That Solution and just Compiling the program and Link the Prototype function in the Header files to produce the final executable file( I don't know the name yet). is it .exe?
At this stage, though, you shouldn't concern yourself with library files.
Last edited: