Programming function relationship, what is the function in programming

Updated on technology 2024-04-08
10 answers
  1. Anonymous users2024-02-07

    Programming - Writing a program**, which can be understood as an occupational classification, commonly known as technical or written**.

    Function - Used to improve reuse, encapsulating a certain implementation of a certain function, one of the important components of an object, also called"Method:"

    These two concepts are not at the same level, programmers write **, naturally will write a variety of functions, and each programming language will also have its own functionsOf course, there are other partsFor example, where do you call a function?

    Functions are only one part of the story.

    Take PHP as an example.

    Dimension IDC solution.

  2. Anonymous users2024-02-06

    A function is a piece of program. This program implements a part of the functionality. The program we make up is made up of a lot of functions. The same goes for functions in the game.

    It's like a company with a lot of employees, collaborating to do all the company's affairs. Then, each employee can be compared to a function, and the whole company is a game with full functions.

    Easy to understand, right?

  3. Anonymous users2024-02-05

    Everything is an object, everything is a function, and the function is to complete an action in your game, such as you kill monsters, the experience you get, the skill points, etc., the function can help you store these values into the data, so that you will not lose these data the next time you log in to the game.

  4. Anonymous users2024-02-04

    A mathematical function is interpreted from a set as a map, which is a specific transformation of a value in programming, and the function has a similar function

    Return value = function name (parameter 1, parameter 2,...)

    It can be seen as performing a certain operation on a series of parameters, and then returning the obtained result to save;

    The functions in programming are procedural, that is, while "processing data", they can operate on external data, and can also input and output in the middle of the process.

    It's more like a lot of things in life, both mathematical and procedural. As a figurative example, if you're cooking and you suddenly find that you don't have salt, so you have to stop what you're doing to buy salt, in programming we call a function. The result of you buying salt is that you get a packet of salt and return it, and this "function" is complete, but in the process of buying salt, you may encounter some situations.

    For example, if you forget to bring money, you need to call the "go home and get the money" function; may also stop by and cheer with the neighbors; It is also possible to get several pieces of information from the billboard......

    That's it, it's the same in life, it can happen in programmed functions.

    Programming data is actually stored in memory, and how it is stored is described in Computer Basics. In the final analysis, programming is "controlling" a computer, so many of the concepts in it have their own unique meanings and principles; You seem to be a beginner, I can only say it vividly, and talking too much will not help you. I believe that as you learn more, you will have a better understanding.

  5. Anonymous users2024-02-03

    No, how to say it, the function in the computer refers to a paragraph, and what you do depends on what you write.

  6. Anonymous users2024-02-02

    A very different concept.

    A function in programming can be thought of as a pre-processed program that accomplishes a specific function. Functions in mathematics refer to specific functions such as elementary functions, higher functions, and composite functions. If the two are to say the similarity, they can both complete certain tasks and perform specific functions.

    For example, in c print can be output, and in mathematics sin can be calculated as sinusoid.

    In general, functions in mathematics and functions in programming are not the same concept at all and cannot be compared.

    When you have a deeper understanding of programming, these differences will become clear.

  7. Anonymous users2024-02-01

    The similarities are the completion of a certain function (or calculation). The difference is that one is that the human is calculating, and the other is that the machine is calculating.

    Such as mathematical functions:

    f(x) = xx + 2x

    Suppose the parameter is 25 and f(25) =25x25+2x25

    Results = 675

    Functions in programming, see the red box in the figure below:

    Assuming that the parameter is 25, the result is as follows:

  8. Anonymous users2024-01-31

    function, which is translated as a method or function. After the source code in the function is executed, you can achieve a certain purpose, or get the data you want

    The first thing to remember is the format of the function definition, the DAO

    1.Definition of no return value: void function name (parameter 1, parameter 2.)

    2.There is a definition of the return value: the return type (e.g., int, float, user-defined type) and the function name (parameter 1, parameter 2.).

    For beginners, it is important to remember the implementation of several functions that are commonly used in the future: such as sorting and finding the common divisor, as these will often be encountered in the following chapters.

  9. Anonymous users2024-01-30

    For a project, if you want to add users and insert users into the database, you need to connect to the database.

    If you want to delete a user or delete a user from the database, you need to connect to the database.

    If you want to modify the user, you need to connect to the database.

    How many times do you have to write this section of database connection as a function without encapsulating it?

  10. Anonymous users2024-01-29

    Powerful beyond replaceability.

Related questions
13 answers2024-04-08

From the perspective of course content, children's programming courses focus on programming learning, including graphical programming programming, ** programming, etc., whether from the logic of speech, grammar, sequence construction, data construction, algorithms, etc., it is a complete set of system courses; The robot programming course is to make the various functional modules of the robot move, connect the programming knowledge with the robot knowledge, and the students can use the knowledge they have learned to combine software and hardware to solve real problems. >>>More

7 answers2024-04-08

The derivative of the tangent function is (secx) 2;

Derivatives are good local properties of functions. The derivative of a function at a point describes the rate of change of the function around that point. If both the independent variables and the values of the function are real, the derivative of the function at a point is the tangent slope of the curve represented by the function at that point. >>>More

7 answers2024-04-08

Definition of the original function.

primitive function The known function f(x) is a function defined in an interval where there is a function f(x) such that there is any point in the interval. >>>More

11 answers2024-04-08

If there is f(-x)=f(x) for any x in the definition domain of the function f(x), then the function f(x) is called an odd function. >>>More

7 answers2024-04-08

1. Complete team.

All participants in the XP project (developers, customers, testers, etc.) work together in an open place where they are part of the same team. Large, conspicuous charts and other things showing their progress are randomly hung on the walls of this place. >>>More