Basic statements of the pasical program

Updated on technology 2024-04-25
2 answers
  1. Anonymous users2024-02-08

    Example calculates the area s of a circle with radius r

    copy to clipboard]

    code:program area;

    const pi=;

    var s,r:real;

    beginreadln(r);

    s:=pi*sqr(r);

    writeln(’s=’,s);

    end.The first line of the above procedure is called the program header. The content enclosed in curly braces (comments can be represented by or (*) is a comment, and the second line of the program is a comment, which has no effect on the compilation and operation of the program except for giving people to see and increasing the readability of the program. A program can contain multiple comments that appear in different places, or it may not have comments.

    The third line of the program is the description of the constant, and the fourth line of the program is the description of the variables. The program from begin to end is the execution part of the (statement) aDescription section.

    The description section is used to define and describe the data used in the program, and consists of a unit description, a label description, a constant description, a type description, a variable description, and a function or procedure description, and the data must be described in the order in which they are described. But a simple turbo pascal program can also be left without a description section, which means that the description section is optional.

    b.Execution part.

    The execution section describes what the program is going to do. It must start with a turbo pascal reserved word begin and end with the reserved word end followed by a period, with some utterances performing specific operations in between, and a semicolon as the separator between the utterances. begin and end must be in pairs, which is a must for a turbo pascal program.

    A full stop immediately after the end indicates the end of the execution and also the end of the entire program. Any statement thereafter is invalid. Turbo Pascal stipulates that semicolons that appear immediately before END are allowed to be omitted.

    copy to clipboard]

    code:program;

    uses a description of the known unit;

    label description;

    description of the const constant;

    type;

    description of var variables;

    operator

    operator description;

    function

    Function description; procedure

    description of the process; begin

    Statement; Statement;

    Statement; end.

  2. Anonymous users2024-02-07

    Primary, quadratic function trigonometric functions.

Related questions
4 answers2024-04-25

select

from[Table name]. >>>More

5 answers2024-04-25

1. Bidding. Bidding refers to the tenderer in accordance with the relevant provisions of the state to perform the project approval procedures, the implementation of funds, the issuance of tender announcements or bidding invitations, the preparation and sale of bidding documents and other specific links. >>>More

4 answers2024-04-25

The basic system that should be followed in the implementation procedure of administrative licensing1Paragraph 3 of Article 29 of the Administrative Licensing Law stipulates that an application for an administrative license may be submitted by letter, telegram, telex, fax, electronic data interchange and e-mail; Article 33 stipulates that administrative organs shall establish and improve relevant systems, promote e-government, and publish administrative licensing matters on the administrative organs' **, so as to facilitate applicants to submit applications for administrative licenses by means of data messages and other means. The purpose of these regulations is to use modern electronic technology and information technology to continuously open up new channels for the diversification of administrative license application methods. >>>More

10 answers2024-04-25

Receiving, operating, shipping, signing, and receiving.

7 answers2024-04-25

The development of the community service O2O Mini Program facilitates users to learn more about community policies and announcements, and users can learn the latest information through the news and announcements of the Mini Program. In this way, users can learn more about the news outside without leaving their homes. Users can also shop in the community service o2o applet**, and the daily necessities in it can be ordered online and then delivered to the door, which is more in line with the user's worship of convenient and simple ways. >>>More