このページはEtoJ逐語翻訳フィルタによって翻訳生成されました。

翻訳前ページへ


First Steps, Pascal Programming- PLT1aft HOME - - - - - - - - - Other 構成要素 for programmers - - - - - - - - - Pascal Tutorials (米)棚上げする/(英)提議する of Contents

Pascal Programming: First Steps, using Borland's Turbo Pascal



N.B. This 見解/翻訳/版 of the first tutorial is tailored to the needs of readers who wish to learn about Pascal using Borland's Turbo Pascal 5.5 (Ver 5.5 利用できる as 解放する/自由な download.)

補欠/交替の/交替する 見解/翻訳/版s of the tutorial are 利用できる tailored to the needs of others-

First steps with Pascal using the opensource FPC Pascal, aka FPK, aka "解放する/自由な Pascal".

First steps with Pascal using the 解放する/自由な Pascalite compiler.




"Let's start at the very beginning...."

A ten-year-old working at home without help should be 令状ing programs in Pascal, using Turbo Pascal after 適用するing him or herself to the に引き続いて... if I've done it 権利! For those of you who are NOT new to programming, may I ask you to skim through the "Level One" 構成要素 anyway? There are some things you might find useful. I'm working on a Windows XP machine. Windows 95 or the higher Windows should also work... Win98 SE might even work better than the XP 環境!

"First catch your rabbit", in this 事例/患者 download and 任命する/導入する the 解放する/自由な ソフトウェア. I know: Its a hassle. It will take レコード space. There are 危険s. 井戸/弁護士席, Pascalite, FBC and Borland's Turbo Pascal 5.5 (hereinafter referred to as "TP") 任命する/導入するd for me with 極小の hassle. As the man said... Try it, you (may) like it. And at least in this 事例/患者, you have some 安心 that it "should" work.

Everyone: Please make use of the good helpfiles that come with your Pascal! My tutorials are not meant to 取って代わる those, 単に to take you through what is there in an 平易な (I hope) sequence. A useful feature of Pascalite and FPC is that if you are editing your program, and you want to look up say, GetTime, in the compiler's helpfile: Just type "GetTime" (without the 引用するs), leave the cursor in the word, or just past it, 圧力(をかける) F1, and, hey presto, you'll be taken to the 権利 入ること/参加(者) in the help とじ込み/提出する! (Ctrl-F1 for Delphi.) With Turbo Pascal on a Win98 machine, ctrl-F1 作品 but... it doesn't (yet) on my XP machine... I 推定する/予想する just a little tweaking of my mouse driver, or perhaps the compatibility 方式 would 直す/買収する,八百長をする things. With TP, even on a 勝利,勝つ XP machine, F1 brings up a guide to the editor... it is 価値(がある) 熟考する/考慮するing at some point.

開始する,打ち上げる your Pascal. It will run inside an MS-DOS window. 権利 click the 肩書を与える 妨げる/法廷,弁護士業, select 所有物/資産/財産s, to 始める,決める a more legible font size.

Once your Pascal is running, and you are in the edit window, enter the に引き続いて:

program first;
uses crt;
begin
clrscr;
writeln('Hi');
end.

Invoke a save, either with alt-F S, or with F2. There is no "Save As", as such, in Turbo Pascal, but the first time you save something, you are given a chance to 指定する a 指名する for the とじ込み/提出する. (The 同等(の) of "Save As" is on the とじ込み/提出する menu, as "令状 to".) You could just enter "My Program" in the とじ込み/提出する 指名する box and click "ok", but I'm going to 示唆する a slight 改良.

You may be in the folder (directory) into which you 任命する/導入するd TP. Or someplace else... TP may be saving where you are from invocation to invocation. I would 示唆する making a separate folder for the とじ込み/提出するs you create. This isn't as 平易な in TP as one would hope. Use your 道具 of choice- I like Windows Explorer- to create, outside of TP, any folders you want to use. It may 支払う/賃金 you to stay 近づく the 最高の,を越す of the folder "tree", i.e. 近づく the root directory of your 運動, and to use MS-DOS folder 指名するs. (Start with a letter, use only letters and digits, and a 最大限 of 8.)

Once the folder is created, to move into that folder. Navigating the tree of folders is a little strange at first, but you can do it! The first strange thing is that you can't move around the directory during a "Save As" or "負担", or you can use とじ込み/提出する | Change Directory to get to where you want to save/ 負担 something, and then do Save. The next strange thing is that, if you want to make a new folder for saving something, you have to の近くに the Save dialog, make the folder using some 道具 (I like Windows Explorer) outside of TP, and then re-start the Save. Tedious, but manageable. Big help: The "とじ込み/提出する" called "..\" is a link to the parent folder of whatever folder you are in. 割り当てる a 指名する for the とじ込み/提出する, I'd 示唆する "First", or "PLT1aft". (PascaL Tutorial 1aft, which is the 指名する of the web page you are reading.) Click "Save".

Once you've started something from scratch, i.e. by using とじ込み/提出する|New, and saved it once, then from that point on, if you use とじ込み/提出する|Save (or 圧力(をかける) F2), your work is 簡単に saved where ever, and under whatever 指名する you 明示するd during the first save. The previous 見解/翻訳/版 of your work is over-written. Also, when you 負担 something pre-存在するing, then doing とじ込み/提出する|Save will again 簡単に 取って代わる the previous 見解/翻訳/版. If you have been working on something, and you don't want to destroy the previous 見解/翻訳/版, then use "とじ込み/提出する|令状 to...", to change the 指名する used for saving what you have.

Keyboard shortcuts, like F2 for save, are always nice, but in the TP 環境, you really need to master the ones for your ありふれた 仕事s, unless you've got your mouse working for you. Several ありふれた Windows keyboard shortcuts, 顕著に ctrl-C / ctrl-X and ctrl-V don't do the same thing in TP as they do in Windows.

So... you've typed in the little program I gave you. You've saved your typing.

Now invoke "Run" on the menu (Alt-R), and "Run" again (R) from the sub-menu (or just 圧力(をかける) ctrl-F9, the 同等(の)... as you can see from the 権利-手渡す column of the sub-menu.) You may 井戸/弁護士席 get an error message, in which 事例/患者 you'll get messages, and, probably the words "収集する Failed". Your Pascal will even tell you where it got 混乱させるd... but that isn't always where the problem lies. If you can't see a fault where your Pascal says to look, check 先行する lines. One favorite trick of new Pascal programmers: Leaving out a semicolon. (Although, in rare 事例/患者s (which you'll learn to be aware of), a superfluous semicolon may be the problem!) The error message even tells you which line of your program 持つ/拘留するs the place Pascal got 混乱させるd.

When there's a message on the 審査する, you tell it "Okay, got that, now go away" by clicking on the little square in the upper left of the message's box.

The interface used with TP comes from the days before Windows. (Yes, there was such a time... When I was a boy... (Don't let me get started!!))

TP does work in a "windowed" 環境, but you could be forgiven for not liking it. However the 概念s of maximized and "回復するd" windows are 現在の. (I'm not sure how to mimic a 最小限に減らす.) You can... really... even re-size the windows. It's just all いっそう少なく intuitive than modern Windows. (I 堅固に 嫌疑者,容疑者/疑う that the "windows" 環境 created for TP, which can create 使用/適用s using the same "windows", ひどく 影響(力)d the 開発 of Mr. Gate's "Windows". Of course the people who created the Mac interface lso deserve a lot of the credit.)

If you had an error, find it, re-save, and try to run the program again.

Don't be alarmed if it seems that nothing has happened.

When you finally (or if you are a careful copier, the first time you...) ran the program and got no "(民事の)告訴s", you may have noticed the 審査する flash, and you might even have seen the "Hi" you've 遂行するd. But it didn't stay. Your sourcecode ("program first; begin...") (機の)カム 支援する. Use the menus: Alt-R (To get the "Run" menu, then U for "使用者 審査する". That SHOULD bring you to a 審査する with "Hi" on it... someplace. There may be other "stuff" there, too. I must 自白する that I had a little trouble with this, so just keep at it... you'll get that 使用者 審査する thing 結局! It's been a while since I used TP, and I am a very new 使用者 of FPC. I have every 信用/信任 that both are usable... it just takes a little struggling to get fluent. I hope these pages are, at least, saving you some of the struggle? Use the menu to 接近 the 使用者 審査する (the menu SAYS the 重要な combination "Alt-F" should do it... but it wouldn't for me, on my XP machine.) And use the escape 重要な to go 支援する to the sourcecode.

Whew! It gets easier. I 約束.

Just one last little 繁栄する to finish off this first tutorial. You won't finish a real program in one go. Part of learning to program is learning to build something up by degrees. 追加する a second writeln line, 特に writeln('Bye'); 収集する and run the program again; see your new masterpiece in 活動/戦闘 (or 直す/買収する,八百長をする the typos!) and 元気づける... you're a programmer!


Oh yes... I said I'd take you through the program....

Every Pascal program begins with the word "program". After that, you 供給(する) a 指名する; I chose "First" in this 事例/患者. (PLT1a would have been better, but might have 混乱させるd you at that 行う/開催する/段階.) And then the line is finished with a semicolon. You get a lot of semicolons in Pascal. More on them another time.

Next in our simple first program (機の)カム "uses crt;" This tells the compiler to use some stuff that is 利用できる to it in an always 現在の 部隊 called "crt". We needed this for clrscr to work.

Next in our simple first program (機の)カム the word "begin". For every "begin" there is an "end". You can have many begin/ end 封鎖するs, and they always nest. Leaving out the 残り/休憩(する), a コンビナート/複合体 program might look like.....

begin
  begin
    begin
    end;
  end;
  begin
    begin
      begin
      end;
      begin
      end;
    end;
  end;
end.

Did I 脅す you? I hope not... I 手配中の,お尋ね者 you to look 今後 to the excitement of a really sophisticated 事業/計画(する)! Anyway. Begins are always paired with ends, as I said. You do NOT put a semicolon after the begin (unusual), but you do put one after the end... usually. (I'll discuss the exceptions another time.) After the final end in a program, you put a period (十分な stop) instead of the 半分-結腸.

"Clrscr" cleared the screen.

令状 and writeln are words built into all the Pascals we've been discussing. (A rough 同等(の) for Delphi, by the way, is "showmessage", e.g. showmessage('Hi');).

公式文書,認める that we put apostrophes around the text we want written, rather than the quotation 示すs we would use in everyday English.

And we've already covered the "end.", so we're almost done! In a moment, you can go give yourself a 扱う/治療する.

Or return to the 索引 of Pascal tutorials for another one!

One little thing before we go. You see the way things are indented in the big 封鎖する of begins/ ends above? You can move text around to 始める,決める it out any way that helps you see what is going on. Pascal is unfussy about spaces and new-lines. Guess what? "More on this later." (Again!)


Please also 公式文書,認める that I have two other 場所/位置s, and that the に引き続いて search will not 含む them. They have their own search buttons.

My Sheepdog Guides 場所/位置.
My Arunet 場所/位置.

Go to the 場所/位置s above, and use their search buttons if you want to search them.
To search this 場所/位置....

Search this 場所/位置 or the web 力/強力にするd by FreeFind

場所/位置 search Web search
The search engine 単に looks for the words you type, so....
*    (一定の)期間 them 適切に.
*    Don't bother with "How do I get rich?" That will 単に return pages with "how", "do", "I"....

You can also search this 場所/位置 without using forms.
広告 from page's editor: Yes.. I do enjoy 収集するing these things for you... hope they are helpful. However.. this doesn't 支払う/賃金 my 法案s!!! If you find this stuff useful, (and you run an MS-DOS or Windows PC) please visit my freeware and shareware page, download something, and 循環させる it for me? Links on your page to this page would also be 高く評価する/(相場などが)上がるd!
Click here to visit editor's freeware, shareware page.


Want a 場所/位置 hosted, or email? You can also help me if you 調印する up 経由で this link to 1&1's services. (I wouldn't recommend them unless I was happy after several years as one of their 顧客s. The Google advertisers 支払う/賃金 me. I know nothing about them or their services, of course.)



Valid HTML 4.01 Transitional Page has been 実験(する)d for 同意/服従 with INDUSTRY (not MS-only) 基準s, using the 解放する/自由な, 公然と accessible validator at validator.w3.org. Mostly passes.

AND passes... Valid CSS!


Why does this page 原因(となる) a script to run? Because of the Google パネル盤s, and the code for the search button. Also, I have some of my pages' traffic 監視するd for me by eXTReMe tracker. They 申し込む/申し出 a 解放する/自由な tracker. If you want to try one, check out their 場所/位置. Why do I について言及する the script? Be sure you know all you need to about spyware.
Editor's Main Homepage
How to email or 令状 this page's editor, Tom Boyd

....... P a g e . . . E n d s .....