Sabtu, 30 Juli 2011

Program Turbo Pascal

Pertama, Buka Aplikasi Turbo Pascal, click file kemudian click new.
lalu ketik seperti yang ada di gambar ini :

Setelah selesai pemograman coba compile untuk mengechek (click ctrl+f9), apakah sudah sukses atau masih error.


Kemudian setelah pemograman dan pengcompilean sukses dapat dilihat hasilnya (click alt+f9).



Okee, selesai, mudah kan..

Apa itu Turbo Pascal ? 

     Turbo Pascal adalah sebuah sistem pengembangan perangkat lunak yang terdiri atas kompiler dan lingkungan pengembangan terintegrasi (dalam bahasa inggris: Integrated Development Environment - IDE) atas bahasa pemrograman pascal untuk sistem operasi CP/M, CP/M-86, dan MS-DOS, yang dikembangkan oleh Borland pada masa kepemimpinan Philippe Kahn. Nama Borland Pascal umumnya digunakan untuk paket perangkat lunak tingkat lanjut (dengan kepustakaan yang lebih banyak dan pustaka kode sumber standar) sementara versi yang lebih murah dan paling luas digunakan dinamakan sebagai Turbo Pascal. Nama Borland Pascal juga digunakan sebagai dialek spesifik Pascal buatan Borland.


*Tugas Pak Rekha

Turbo Pascal

IF YOU KNOW NOTHING ABOUT PASCAL 

Assuming that you know nothing at all about Pascal, and in fact, that you may know nothing about programming in general, we will begin to study Pascal. If you are already somewhat familiar with programming and especially Pascal, you will probably want to skip very quickly through the first few chapters. You should at least skim these chapters, and you should read the remainder of this introduction.
A few comments are in order to get us started in the right direction. The sample programs included with this tutorial are designed to teach you the basics of Pascal and they do not include any clever or tricky code. Nearly all of the programs are really quite dumb as far as being useful programs, but all will teach one or more principles of Pascal. I have seen one tutorial that included a 12 page program as the first example. In fact there were only 2 example programs in the entire tutorial, and it was impossible to glean the essentials of programming from that system. For this reason, I will completely bypass any long programs until the very end of this tutorial. In order to illustrate fundamental concepts used in Pascal programming, all programs will be very short and concise until we reach the last chapter.

LARGER PASCAL PROGRAMS 

Chapter 16 has some rather large programs to illustrate to you how to write a large program. It would be a disservice to you to show you all of the constructs of Pascal and not show you how to put them together in a meaningful way to build a large program. After completing all of the fundamentals of Pascal, it will then be very easy for you to use the tools learned to build as large a program as you desire or require for your next programming project.
Another problem I have noticed in example programs is the use of one word for all definitions. For example, a sort program is stored in a file called SORT, the program is named Sort, and various parts of the program are referred to as Sort1, Sort2, etc. This can be confusing since you have no idea if the program name must be the same as the filename, or if any of the other names were chosen to be the same because of some obscure rule not clearly documented. For this reason, the example programs use completely arbitrary names whenever the choice of a name adds nothing to the readability or clarity of a program. As an illustration of this, the first program is named Puppy_Dog. This adds nothing to the understanding of the program but does illustrate that the program name means nothing to the Pascal compiler concerning what the program does.
Due to the fundamental design of the Pascal language, certain words are "reserved" and can only be used for their defined purposes. These are listed in your TURBO Pascal reference manual. All of the sample programs in this tutorial are written with the reserved words in all lower-case letters, and the user variables in lower case with the first letter capitalized since this is becoming an accepted industry standard. Don't worry about what reserved words are yet, they will be completely defined later.
In this tutorial, all reserved words, type names, variable names, and procedure and function names will be listed in boldface type within the text as an aid to the student.

WHAT IS A COMPILER? 

There are two methods used to run any computer program that is written in a readable form of English. The first method is to use an interpreter. An interpreter is a program that looks at each line of the "English" program, decides what the "English" on that line means, and does what it says to do. If one of the lines is executed repeatedly, it must be scanned and analyzed each time, greatly slowing down the solution of the problem at hand. A compiler, on the other hand, is a program that looks at each "English" statement one time and converts it into a code that the computer understands directly. When the compiled program is actually run, the computer does not have to figure out what each statement means, it is already in a form that the computer can run directly, resulting in much faster execution of the program.
This tutorial is written especially for Borland International's TURBO Pascal compilers version 5.0 through 7.0. These are very high quality compilers that can do nearly anything you will ask them to do since they are so flexible. The original intent of this tutorial was to write it in such a way that it would be completely generic and usable with any good Pascal compiler. The programmers at Borland included a great many nonstandard aids for the Pascal language and resulted in a very good product that has dominated the market for microcomputers. To completely omit all of the extensions would do those of you with the Borland compiler a real disservice, and to include the extensions would not allow other compilers to be used effectively with this tutorial.
The decision was made to use the Borland extensions which may make the tutorial difficult to use with other compilers. If you have a need to use Pascal with some other compiler, TURBO Pascal is so inexpensive that it would be a wise decision to purchase a copy solely for the purpose of learning the Pascal programming language, then moving to the other compiler on a minicomputer or a mainframe using the accumulated knowledge to very quickly learn the extensions provided by that particular compiler. At any rate, this tutorial will not teach you everything you will ever need to know about Pascal. It will, however, teach you the fundamentals and the advanced features of Pascal, but of even more importance is the knowledge of Pascal terminology needed to progress on your own into more advanced topics of Pascal and programming in general. You will find that experience will be your best teacher.

WHICH VERSION OF TURBO PASCAL? 

Some of the example programs will not work with some of the earlier versions of TURBO Pascal. This is primarily due to the fact that object oriented programming capabilities were added to version 5.5, and improved on in later versions. Most of the example programs will work with any version however. It should be pointed out that each successive version of TURBO Pascal has been an improvement over the previous version since additional capabilities have been added, and each new one compiles a little faster and results in smaller but faster executable code than the previous version. Any of the versions of TURBO Pascal can be used to learn to program in Pascal, so whichever version you have on hand will be adequate. Later, when you become more versed in programming techniques, you may wish to upgrade to the absolute latest version.

EARLY VERSIONS OF TURBO PASCAL 

Most of the files will compile properly with TURBO Pascal versions 2.0 through 4.0. No warning will be given about which files will not compile with these versions since they have been superseded for so long. If you are still using one of the earlier versions, it would be good for you to purchase a newer version because of the flexibility.
 
WHAT ABOUT TURBO PASCAL VERSION 5.5 & NEWER? 

Chapters 14 and 15 of this tutorial are written especially for TURBO Pascal version 5.5 and newer to discuss the use of object oriented programming and how to use the Borland extensions. Since the topic of object oriented programming is a very large and diverse field of study and only a limited space is available to discuss it in this tutorial, these chapters will give you only a brief overview of what it is and how to use it. You will find 13 complete example programs to get you started in this new and very meaningful endeavor and this introduction should whet your appetite to continue your study in more depth.
If you are using an early version of TURBO Pascal without the object oriented extensions, it would pay you to upgrade so you can learn how to use this new programming method. Object oriented programming has the potential to greatly improve the quality of your code and to reduce the debugging time required.
 
PREPARATION FOR USE OF THIS TUTORIAL. 

Copy the example files into your TURBO Pascal working directory and you are ready to begin, provided of course that you have already learned how to start the TURBO system and how to edit a Pascal file.
If you are not using TURBO Pascal, you will still be able to compile and execute many of these Pascal files, since most of the examples use standard Pascal syntax. There will be some statements used which are unique to TURBO Pascal and will not work with your compiler. This will be especially true when you come to the chapter on standard input and output since this is where most compilers differ. Unfortunately, this is one of the most important aspects of any programming language, since it is required to get data into and out of the computer to do anything useful. You will also find that chapter 13, covering the topic of units, is unique to TURBO Pascal and will not work with any Pascal compilers other than TURBO Pascal.

WHAT ABOUT THE PROGRAMMING EXERCISES? 

It is highly suggested that you do the programming exercises after you complete the study for each chapter. They are carefully selected to test your understanding of the material covered in that chapter. If you do not write, enter, debug, and run these programs, you will only be proficient at reading Pascal. If you do the exercises completely, you will have a good start at being a Pascal program writer.
It should also be mentioned that this tutorial will not teach you everything you will ever need to know about Pascal. You will continue to learn new techniques as long as you continue to write programs. Experience is the best teacher here just as it is in any endeavor. This tutorial will teach you enough about Pascal that you should feel very comfortable as you search through the reference manual for some topic. You will also be able to read and understand any Pascal program you find in textbooks or magazines. Although the primary goal of this tutorial is to teach you the syntax and use of Pascal, the most important byproduct is the knowledge of Pascal terminology you will gain. This terminology will enable you to learn even more about Pascal and programming in general.

THE ANSWERS TO PROGRAMMING EXERCISES


The directory /ans contains an answer to each of the programming exercises given at the end of the chapters. You should attempt to do original work on each of the exercises before referring to these answers, in order to gain your own programming experience. These answers are given for your information in case you are completely stuck on how to solve a particular problem. These answers are not meant to be the only answer, since there are many ways to program anything, but they are meant to illustrate one way to solve the suggested programming problem.
The answers are all in compilable files named in the format CHnn_m.PAS where nn is the chapter number, and m is the exercise number. If there is more than one answer required, an A, B, or C is included following the exercise number. 

Turbo Pascal *yawn

Senin, 14 Maret 2011

Manfaat Olahraga Renang



Berenang adalah salah satu jenis olahraga yang mampu meningkatkan kesehatan seseorang yang juga merupakan olahraga tanpa gaya gravitasi bumi (non weight barring). Berenang terbilang minim risiko cedera fisik karena saat berenang seluruh berat badan ditahan oleh air atau mengapung. Selain itu berenang merupakan olahraga yang paling dianjurkan bagi mereka yang kelebihan berat badan (obesitas), ibu hamil dan penderita gangguan persendian tulang (arthritis). Berenang memiliki banyak manfaat yang dapat dirasakan apabila kita melakukannya secara benar dan rutin, manfaat tersebut antara lain :

1. Membentuk otot
Saat berenang, kita menggerakkan hampir keseluruhan otot-otot pada tubuh, mulai dari kepala, leher, anggota gerak atas, dada, perut, punggung, pinggang, anggota gerak bawah, dan telapak kaki. Saat bergerak di dalam air, tubuh mengeluarkan energi lebih besar karena harus ‘melawan’ massa air yang mampu menguatkan dan melenturkan otot-otot tubuh.

2. Meningkatkan kemampuan fungsi jantung dan paru-paru
Gerakan mendorong dan menendang air dengan anggota tubuh terutama tangan dan kaki, dapat memacu aliran darah ke jantung, pembuluh darah, dan paru-paru. Artinya, berenang dapat dikategorikan sebagai latihan aerobik dalam air.

3. Menambah tinggi badan
Berenang secara baik dan benar akan membuat tubuh tumbuh lebih tinggi (bagi yang masih dalam pertumbuhan tentunya).

4. Melatih pernafasan
Sangat dianjurkan bagi orang yg terkena penyakit asma untuk berenang karena sistem crdiovaskular dan pernafasan dapat menjadi kuat. Penapasan kita menjadi lebih sehat, lancar, dan bisa pernafasan menjadi lebih panjang.

5. Membakar kalori lebih banyak
Saat berenang, tubuh akan terasa lebih berat bergerak di dalam air. Otomatis energi yang dibutuhkan pun menjadi lebih tinggi, sehingga dapat secara efektif membakar sekitar 24% kalori tubuh.

6. Self safety
Dengan berenang kita tidak perlu khawatir apabila suatu saat mengalami hal-hal yang tidak diinginkan khususnya yang berhubungan dengan air (jatuh ke laut dll).

7. Menghilangkan stres.
Secara psikologis, berenang juga dapat membuat hati dan pikiran lebih relaks. Gerakan berenang yang dilakukan dengan santai dan perlahan, mampu meningkatkan hormon endorfin dalam otak. Suasana hati jadi sejuk, pikiran lebih adem, badan pun bebas gerah.

Sebelum berenang, agar tubuh tidak ‘kaget’, dianjurkan melakukan gerakan pemanasan untuk mencegah kram otot sekaligus juga berfungsi untuk meningkatkan suhu tubuh dan detak jantung secara bertahap dan juga lakukan pendinginan setelah selesai berenang agar suhu tubuh dan detak jantung tidak menurun secara drastis dengan cara berenang perlahan-lahan selama 5 menit.

Untuk pemanasan dapat dimulai dengan melakukan gerakan-gerakan ringan, seperti mengayunkan tangan dan kaki atau berjalan-jalan di sekitar kolam renang selama 10-15 menit. Lalu secara bertahap mulailah dengan satu putaran menyeberangi kolam, lalu istirahatlah selama 30 detik beberapa kali dan puncaknya berenang selama 20-40 menit tanpa henti. Setelah beberapa minggu, latihan bisa ditingkatkan. Sebaiknya, berganti-ganti gaya renang supaya semua otot terlatih.

Satu-satunya ‘kekurangan’ dari jenis olahraga ini adalah ternyata kurang menguntungkan bagi kesehatan tulang. Ketiadaan gaya gravitasi bumi saat berenang justru berpengaruh buruk pada massa tulang. Untuk mengatasinya, Anda dapat menyelinginya dengan olahraga lain, seperti joging, berjalan kaki, atau bersepeda.

*Tugas Bu' Wiwik.

Selasa, 25 Januari 2011

Sejarah dan Perkembangan Internet

Sejarah dari adanya intenet dimulai pada tahun 1969 ketika itu Departemen Pertahanan Amerika, U.S. Defense Advanced Research Projects Agency(DARPA) memutuskan untuk mengadakan riset tentang bagaimana cara menghubungkan sejumlah komputer sehingga membentuk jaringan organik.
Program riset ini dikenal dengan nama ARPANET. Pada 1970, sudah lebih dari 10 komputer yang berhasil dihubungkan satu sama lain sehingga mereka bisa saling berkomunikasi dan membentuk sebuah jaringan.
sejarah internet
Tahun 1972, Roy Tomlinson berhasil menyempurnakan program e-mail yang ia ciptakan setahun yang lalu untuk ARPANET. Program e-mail ini begitu mudah sehingga langsung menjadi populer. Pada tahun yang sama, icon @juga diperkenalkan sebagai lambang penting yang menunjukkan “at” atau “pada”. Tahun 1973, jaringan komputer ARPANET mulai dikembangkan ke luar Amerika Serikat.
Komputer University College di London merupakan komputer pertama yang ada di luar Amerika yang menjadi anggota jaringan Arpanet. Pada tahun yang sama, dua orang ahli komputer yakni Vinton Cerf dan Bob Kahn mempresentasikan sebuah gagasan yang lebih besar, yang menjadi cikal bakal pemikiran internet. Ide ini dipresentasikan untuk pertama kalinya di Universitas Sussex.
Hari bersejarah berikutnya adalah tanggal 26 Maret 1976, ketika Ratu Inggris berhasil mengirimkan e-mail dari Royal Signals and Radar Establishment di Malvern. Setahun kemudian, sudah lebih dari 100 komputer yang bergabung di ARPANET membentuk sebuah jaringan atau network. Pada 1979, Tom Truscott, Jim Ellis dan Steve Bellovin, menciptakan newsgroups pertama yang diberi nama USENET. Tahun 1981 France Telecom menciptakan gebrakan dengan meluncurkan telpon televisi pertama, dimana orang bisa saling menelpon sambil berhubungan dengan video link.
Karena komputer yang membentuk jaringan semakin hari semakin banyak, maka dibutuhkan sebuah protokol resmi yang diakui oleh semua jaringan. Pada tahun 1982 dibentuk Transmission Control Protocol atau TCP dan Internet Protokol atau IP yang kita kenal semua. Sementara itu di Eropa muncul jaringan komputer tandingan yang dikenal dengan Eunet, yang menyediakan jasa jaringan komputer di negara-negara Belanda, Inggris, Denmark dan Swedia. Jaringan Eunet menyediakan jasa e-mail dan newsgroup USENET.