Pascal là một ngôn ngữ lập trình bậc cao do Niklaus Wirth, giáo sư điện toán trường Đại học kỹ thuật Zurich (Thụy Sĩ) đề xuất năm 1970. Ông lấy tên Pascal để kỷ niệm nhà toán học và nhà triết học người Pháp nổi tiếng Blaise Pascal.

 CHỦ ĐỀ I: CẤU TRÚC CHƯƠNG TRÌNH PASCAL

1. Cấu trúc chung: Gồm 2 phần.

[<Phần khai báo>]

    <Phần thân>

2. Các thành phần của chương trình

a) Phần khai báo

  • Khai báo tên chương trình

Cp: Program <Tên chương trình>Vd: Program Giai_pt;

–  Quy tắc đặt tên trong Pascal

  • Khai báo thư viện

Mỗi NNLT có  sẵn thư viện riêng.

Cp: Uses <Danh sách tên thư viện>;

* Để dùng được lệnh xoá màn hình trong TP Pascal, ta khai báo thư viện như sau: Uses crt;

  • Khai báo hằng

Cp: Const <Tên hằng>=<Giá trị>;

Vd: Const Pi=3.14;                      Max=10;

  • Khai báo biến

Tất cả các biến dùng trong chương trình đều phải được khai báo.

Cp: Var <Ds tên biến>:<Kiểu dữ liệu>;

Vd: Khai báo 2 biến có giá trị nguyên trong khoảng (0;250)

Var a,b:Byte; B. Var a,b:Word;

Var a,b:Integer; D. Var a,b:Longint;

b) Phần thân chương trình

  1. Ví dụ chương trình đơn giản

 (?) Chương trình sau làm việc gì

Begin

   Writeln(‘Chao cac ban!’);

Write(‘Hay lam quen voi Pascal’);

End.

>> Còn nữa…

 

151 BÌNH LUẬN

  1. qw30YU What as Happening i am new to this, I stumbled upon this I ave found It positively useful and it has helped me out loads. I hope to contribute & help other users like its helped me. Good job.

  2. Wow! This can be one particular of the most useful blogs We have ever arrive across on this subject. Basically Wonderful. I am also a specialist in this topic therefore I can understand your effort.

  3. This awesome blog is no doubt interesting and besides informative. I have found helluva interesting things out of this amazing blog. I ad love to go back every once in a while. Thanks a lot!

  4. Hmm is anyone else having problems with the pictures on this blog loading?

    I’m trying to find out if its a problem on my end or if it’s the
    blog. Any responses would be greatly appreciated.

  5. Sweet blog! I found it while browsing on Yahoo News. Do you have any suggestions on how to get listed in Yahoo News? I ave been trying for a while but I never seem to get there! Appreciate it

  6. You made some really good points there. I checked on the net for additional information about the issue and found most people will go along with your views on this web site.

  7. Wow, amazing weblog format! How long have you ever been blogging for? you made blogging glance easy. The overall look of your site is fantastic, as well as the content material!

  8. I was recommended this blog by my cousin. I am not sure whether this post is written by him as no one else know such detailed about my trouble. You are amazing! Thanks!

  9. Terrific work! This is the type of info that should be shared around the internet. Shame on the search engines for not positioning this post higher! Come on over and visit my site. Thanks =)

  10. You made some decent points there. I looked on the net for additional information about the issue and found most people will go along with your views on this web site.

  11. This is really interesting, You are a very skilled blogger. I have joined your rss feed and look forward to seeking more of your fantastic post. Also, I have shared your website in my social networks!

  12. Hey would you mind stating which blog platform you’re working with?
    I’m going to start my own blog in the near
    future but I’m having a difficult time making a decision between BlogEngine/Wordpress/B2evolution and Drupal.
    The reason I ask is because your design seems different then most blogs and I’m looking for something unique.
    P.S Apologies for being off-topic but I had to ask!

  13. Woah! I’m really loving the template/theme of this website.
    It’s simple, yet effective. A lot of times it’s hard to get that “perfect balance” between superb usability and visual
    appearance. I must say that you’ve done a great job with this.
    Also, the blog loads very fast for me on Chrome.
    Superb Blog!

  14. of course like your website however you have to check the spelling on several of your posts.

    Many of them are rife with spelling problems and I to find it
    very bothersome to inform the truth then again I’ll certainly come again again.

  15. Wow! This could be one particular of the most beneficial blogs We have ever arrive across on this subject. Basically Excellent. I am also a specialist in this topic so I can understand your hard work.

  16. My developer is trying to convince me to move to .net from PHP.
    I have always disliked the idea because of the expenses.
    But he’s tryiong none the less. I’ve been using WordPress on a variety of websites for about
    a year and am concerned about switching to another platform.

    I have heard great things about blogengine.net.
    Is there a way I can import all my wordpress content into it?
    Any help would be really appreciated!

  17. Wow, incredible blog format! How lengthy have you been blogging for? you make running a blog glance easy. The full glance of your site is fantastic, as smartly the content material!

  18. Hi, i think that i saw you visited my website thus i
    got here to return the desire?.I’m trying to find
    things to improve my site!I assume its adequate to make use of some of
    your ideas!!

  19. This is very interesting, You are a very skilled blogger. I have joined your feed and look forward to seeking more of your great post. Also, I ave shared your web site in my social networks!

  20. It is truly a great and useful piece of info. I am glad that you shared this helpful information with us. Please keep us informed like this. Thank you for sharing.

  21. It’а†s truly a nice and useful piece of information. I’а†m satisfied that you shared this helpful information with us. Please stay us up to date like this. Thank you for sharing.

THOÁT KHỎI BÌNH LUẬN

Please enter your comment!
Please enter your name here