Turbo Pascal කියන්නේ 1970 කියන කාලයේ නිර්මාණය කෙරුණු වැඩසටහන් සම්පාදන මෙවලමක්. ඇත්තටම මේක හරිම ලේසි කේත ක්‍රමයක්. ඕනෑම කෙනෙක්ට පහසුවෙන් තේරුම් ගන්න පුළුවන්. ඒ වගේම තමා Programming වලට අවතීරණ වෙන ඕනෑම කෙනෙක්ට හරි පහසුවෙන් තේරුම් අරගෙන මීට වඩා සංකීර්ණ Programming Language එකකට යන්න උපකාරී වෙනවා. ඒ කියන්නේ ආධුනික ඕනෑම කෙනෙක්ට Programming කලාව පටන්ගන්න හොඳම ක්‍රමයක් තමා Pascal කියන්නේ... Niklaus Wirth කියන මහත්මයා තමා මේක නිර්මාණය කරලා තියෙන්නේ...

Pascal දකින ඕනෑම කෙනෙක්ට පරිගණක ඉතිහාසය මතක් කරවන සුළුයි. මොකද මේකේ Interface එක දැක්කහම හරියට නිකං Console Gaming Interface එකක් වගේ.... අලිම අලි Pixels වලින් තමා Interface එක Design කරල තියෙන්නේ... පල්ලෙහායින් තියෙන්නේ Interface එක තමා... මේක Open Source මෘදුකාංගයක්... ඒ වගේම පල්ලෙහා තියෙන ලින්ක් එකෙන් සෙටප් එකත් අරගන්න පුළුවන්... වැඩිය ලොකු නෑ 3MB ක් විතර...


දැන් බලමු Programming කරන විදිහ... පල්ලෙහායින් තියෙනවා උදාහරණයක්... හැම Program එකකම මුලින්ම program කියලා කොටසක් එන්න ඕනෑ... ඇත්තටම Pascal කියන්නේ Case Sensitive Language එකක් නෙමෙයි. ඒ කියන්නේ Capital, Simple වලින් බලපෑමක් කෝඩිංවලට නෑ කියන එකයි... ඒ වගේම Program එකට නමක් ඊට ඉස්සරාහින් දෙන්න ඕනෑ... හැම පෝලිමකට අවසානයට ; (තිත් කොමාව) දාන්න ඕනෑ... Program එක ආරම්භයට begin කියලත් අවසානයට end. කියලත් ඒන් ඕනෑ... end එකේ නැවතීමේ තිතක් ඕනෑමයි. ඒවගේම අර තිත් කොමාව මේ begin සහ end. වල අගට දාන්නේ නෑ... ඒකොට Calculations වගේම අනික් Operations ඔක්කෝම එන්නේ මේ begin සහ end. කියන අතර මැදට...

program myprogram;
begin
end.

ඔන්න සරළ කේත ටිකක් ලියන්නයි යන්නේ... මුලින්ම බලමු විචල්‍යයක් (Variable) එකක් දෙන්නේ කොහොමද කියලා... විචල්‍යය හඳුන්වා දෙන්න ඕනෑ program සහ begin අතර මෙන්න මේ විදිහට... ඒවගේම ඒවාට අගයන් ආදේශ කරකොට := ලකුණ භාවිතා කරනවා... ඒ ආදේශ කිරීම begin සහ end. අතර මැද තමයි කරන්න ඕනෑ...

program myprogram;
var A:srting;
var B:srting;
begin
A:='MY FIRST PASCAL PROGRAM !';
B:=2016;
end.

ඒවගේම තිරම මත මොකක් හරි ලියවෙන් ඕනෑ නම් writeln('') කියන කේතය යොදා ගන්නවා...

program myprogram;
var X:srting;
begin
A:='MY FIRST PASCAL PROGRAM !';
writeln(X);
end.

Tool Menu එකේ Run > Run විධනය දුනහම වැඩසටහන ධානවය වෙනවා... හැබැයි ඔයා මේක Run කරාට පෙන්නනේ නෑ මොකද මේක Run වෙන්නේ DOS වගේ Command Line Interface එකක් උඩ. Program එක Run වෙච්ච ගමන්ම Close වෙලා යනවා වෙන්න තියෙන ඔක්කොම Calculates ටික වෙලා... Program එක Run වෙලා නවත්ත ගන්නනම් පෙඩි උපක්‍රමයක් ඕන වෙනවා... ඒ තමයි read(); කියන කේතය මේ read කියන කේතය වැඩසටහනේ අගට දුන්හම Program එක Run කරන කෙනාට අගයක් ඇතුල් කරන්න ඉඩ ලබා දෙනවා... ඒ කියන්නේ මේ read(); කේතයෙන් පුළුවන් Calculations වලට අවශ්‍ය අගයන් Run වෙනකොටම ආදේශ කරන්න. ඒත් මෙතන දී මේක පාවිච්චි කරන්නේ අතර මැදින් වැඩසටහන නවත්තගෙන Outputs බලාගන්නයි... Read කරන්න ඕනෑ ඒකටත් Variable එකක් දෙන්න ඕනෑ... මෙන්න මේ විදිහට...

program myprogram;
var X:srting;
var Z:srting;
begin
X:='MY FIRST PASCAL PROGRAM !';
writeln(X);
read(Z);
end.

දැන් වැඩසටහන ධාවන කරාම මේ විදිහට බලාගන්න පුළුවන්... ඒවගේම මොකක් හරි Type කරලා Enter කරොත් ආයේ Coding Page එකට එන්න පුළුවන්...

දැන් බලමු කොහොමද එකතු කිරීම අඩු කිරීම කරන්නේ කියලා... ඒකත් හරිම සරළයි... Variable විදිහට නැතුව writeln(5+3); වගේ දෙන්නත් පුළුවන්... හැබැයි මම කරන්න යන්නේ read(); එක භාවිතා කරලා ඇතුල් කරන අගයන් දෙකක එකතුව ගන්න... මේකෙ දී read(); එක මම තුන් පාරක් දානවා... මොකද, එකතු කරන්න ඕන කරන අගයන් දෙක ගන්න read(); කොටස් දෙකයි... අනික වැඩසටහන අර අතර මැදින් නවත්තගන්න... බලන්නකො ලියන විදිහ...

program myprogram;
var A:integer;
var B:integer;
var Z:integer;
begin
writeln('Enter two numbers to addition !');
read(A);
read(B);
writeln(A+B);
read(Z);
end.

වැඩසටහන ධාවනය කරාම මේ විදිහට පෙනෙයි...

මේ විහිදට කොඩ් කරගෙන ගන්න තමා තියෙන්නේ... Pascal හුඟක්ම Python වලට සමානකමක් දක්වනවා... පල්ලෙහායින් තියෙනවා Full Tutorial එක... හැබැයි English වලින් තියෙන්නේ... අරගෙන බලන්න...

Labels: , ,

Brightspot Network
Free educational network inclding Android App, Web Server and YouTube channel, for those who dreaming to be a pro in programming and ICT feild. Most of learning segments and tutorials are related to GEC OL and AL syllabuses.

Brightspot Android App is more reliable to use for your educational purposes and daily updates will encurage you to do earn programming and web developing techniques.
Featured Articles
Read the present ICT world tehnologies, PC tricks. There may be some of introduction to the software that you should follow to make your daily works more easy and fast.

These articles are provided by one of my Project called "Article Library", even you can embed this article into your web, blog or any place you want.
Tools & Projects
My personal projects thats i've created using my web developing and programming knowladge. There are web based tools and projects also youcan embed them into your web sites wherever you want. And other projects such as windows programs, you can download them easy and use the free of charge.

Try your best to improve your programing knowladge and develop some of apps and webs tools like this to show some colours to the world!
Sinhala Tutorials
There are easy and breif programming and web development tutorials to improve your skills and help you to begin with coding. I hope this Sinhala tutorials will able to educate you something to come up with new ideas and invent new programs and web designs.

You can download these tutorials free of charge as PFDs. Enjoy the free and fast prograimg and web developing education!
I'm Deshan Nawanjana
World of technology is much wonderful. There is a dream with everyone to reach, everyone to succseed. My dream is to win the programmg and web development world in my own way. Follow me and I will share the knowloadge that I have and let's reach to the top of this mountain.
Web Designing
Programming
Technology
Help & Support
Brightspot Educational Network
Web Server
Visit Now
Android App
Install Now
Youtube Channel
Visit Channel
Brightspot Educational Network
Android App
Install Now
Web Server
Visit Now
Youtube Channel
Visit Channel
Tools & Projects
xPanel
I've created some of web based tools that make your stuff easy. All of these tools work on web browser and also you can embed these tools into your web, blog or anywehere you want.

Javascript is the major proccessing language here and most of these tools are based on text converting, formatting and ecnrypting.
Arduino World
Arduino is one of the most famouse feild for those who likes to work with the electronic programming world. Using the basic UNO Arduino Board, some of sensors and modules, you can cover up this entire tutorial site.

Each section of the Arduino wolrd contained with one somple example and pins setup strcture. So With the description of those examples, you may able to learn Arduino much faster.

C Notes LK
Learn the C Programming step by step. This tutorial already have everything you need to know in C. All of basics coding segments are included in order. If you willing to start from the begining, I'm sure you will able to do C programming in few days.

Every example that inside a step is conatined with comments line by line. So you don't need to worry about your programming knowladge. It will make everything easy to learn.
Programming & Web Tutorials in Sinhala
Download
Download
Download
Download
Download
Download
Download
Download
Download
Contact Me
deshan.uok@gmail.com
+94 766095229
Facebook Page