|
このページはEtoJ逐語翻訳フィルタによって翻訳生成されました。 |
Many of my tutorials are of the "this is how you do..." variety.
This one is a bit different, in that it 述べるs some basics- the general form of "部隊" とじ込み/提出するs (the ones with 拡張 ".pas") If you know the general form, you will spend いっそう少なく time trying to "直す/買収する,八百長をする" things because you will accidentally break them いっそう少なく often. It will help you know "where things go"..
Of course, a Lazarus 事業/計画(する) is made up of many とじ込み/提出するs, but most of a beginner's work will be with the .pas とじ込み/提出する. (He/ she will also, of course, be changing the とじ込み/提出する that 支配(する)/統制するs the 外見 of the form... but that work is done 経由で GUI in the IDE, and so you are いっそう少なく likely to introduce syntax problems.)
For these essays, I 手配中の,お尋ね者 to 供給する you with images of the Lazarus 部隊 code at different 行う/開催する/段階s of 完成, with color used to 最高潮の場面 things.
I decided that I would use .pdf's for that.
In what follows, you will find links to click on which will 供給する you with copies of those .pdf's. What happens when you click on the link will depend on your system. You should also know that you will find things most useable if you can have the .pdf and this text 味方する by 味方する in 前線 of you. (The .pdf's are all only one or two pages long.)
The first step, of course, is not to have your browser filling your whole 審査するs. (To those of you reading on a smartphone... sorry... I don't 特に cater to that 環境, given that the 構成要素 I create seems to me to 要求する more 審査する space.)
If when you click on the link it doesn't appear that anything has happened, your system may have downloaded the .pdf as a とじ込み/提出する. Again, depending on how your system is 始める,決める up, there will be a way to open that "outside" of your web browser. Or it may be that the browser opened the とじ込み/提出する in a new tab, but that it hasn't switched to the tab. Or, if your browser is 始める,決める to open .pdf's in the browser, it may be best to 権利-click on the link, and ask for it to be opened in a new window.
For this the first .pdf, I have created an image of an 早期に 版 of it, so you know what you're trying to 得る. The .pdf is of a much better 決意/決議.
Skim the text below, using the low 決意/決議 image at the 権利 to "see where this is going", and if you like what you find, fetch the .pdf so you can re-read the text below, に引き続いて the 詳細(に述べる) in the color- 最高潮の場面d copy of the 部隊's code.
Click here for lt1N-部隊-でっちあげる,人を罪に陥れる-1.pdf... there's a way to jump 支援する here at the 底(に届く) of the text I've 示唆するd you skim before fighting whatever your system's configuration creates for fetching the .pdf.
What you could read if you fetch the .pdf is a 簡潔な/要約する 声明 of what the programmer has done so far (opened up a new 事業/計画(する), of the 使用/適用 type), and then the source, as it would be at that 行う/開催する/段階 of building the 使用/適用.
Even at this 早期に 行う/開催する/段階, there are things to 公式文書,認める about what's in the source. There are elements of the 現在の- every- time "枠組み" that I want you to know about.
The small green bit at the 最高の,を越す says "部隊 Unit1". It is "partner to" the small green bit at the 底(に届く) which says "end." (There are more 詳細(に述べる)s in the .pdf)
After the green bit at the 最高の,を越す, is "{{1}}", which is a link to ....
At {{1}} in the .pdf we see 部隊 Unit1; Every 部隊 starts with the reserved word "部隊", followed by a space, then the 部隊's 指名する... which will be the 指名する of the associated .pas とじ込み/提出する, の中で other things... and then a 半分-結腸.
(In all Pascal-based languages, such as Lazarus and Delphi, if in 疑問, put in a semicolon. But know the さまざまな places where you don't 挿入する them, too!)
{{2}}: The orange line: This is a "compiler 指示的な". They always start "{$", and can be "ぱらぱら雨d" into the code just about anywhere. 非,不,無 are 要求するd... by the language. But you may not get the results you want for a 明確な/細部 system, 収集するd on (かもしれない some other system) without a few basic compiler 指示的なs which Lazarus ordinarily 供給(する)s for you. You do not put a 半分-結腸 at the end of a line 持つ/拘留するing a compiler 指示的な.
Do not 混乱させる compiler 指示的なs... which start, as I said, "{$" with comments enclosed in {'s...
{like this}
(As long as the first character isn't a dollar 調印する, you can put anything you want between {'s, and the compiler just ignores it. You have created a comment, aka "発言/述べる" or "rem".)
Moving on....
{{3}}: The beginning of the 封鎖する of two shades of blue lines...
This is the "interface" 封鎖する. The 封鎖する starts with the reserved word "interface"... with no 半分-結腸 after it. That word MAKES the "interface section" start.
Unlike most things in Pascal languages, there is no explicit word to end the interface 封鎖する. (It ends where ever the 実施 封鎖する... which we will come to... begins.
The first thing in the interface 封鎖する is 示すd {{4}}. It is a "uses" 条項, spread across two lines. It starts with the word "uses", is followed by the 指名するs of some 部隊s used by the 現在の 部隊, separated by commas, and doesn't end until you reach a 半分-結腸. In this 事例/患者, the 半分-結腸 doesn't appear until after you've started a new line on the 審査する. The new 審査する line is ignored by the compiler. It 扱う/治療するs all of what is between "uses" and the 半分-結腸 just before the "{{4}}" as one long (事実上の) "line". (The さまざまな 部隊s... "Classes", "SysUtils", etc, that you see here are 基準, 供給(する)d- with- Lazarus 部隊s. Anyone 令状 部隊s to be 追加するd to "uses" 条項s... but you don't need those 技術s in your 早期に Lazarus/ Delphi programming days.
{{5}} Now we come to a very long "選び出す/独身" "事実上の" line... the seven lines colored light blue. They are all part of one "thing", hence the 株d shade. They are just one of the things in the interface section, hence the blue.
{{5}} is the start of a "type 宣言". You will be learning more and more about "type 宣言s" for a long time to come. For now it is enough to know that you need to be careful not to mess them up, even though you will be "sticking things in". (We'll discuss this more later.)
{{6}} Is a line that will appear, in some form or other, in all of your 部隊s in the 早期に days. Happily, it is 供給するd for you by the system, and doesn't need (or welcome) any tweaking.
{{7}}: The reserved word "実施" brings the "interface" section to a の近くに, and begins the "interface" section. What goes in interface, what goes in 実施? This isn't something that is easily explained to a novice... but you will get a feel for it, as you do more and more Lazarus programming.
{{8}} This is "単に" another compiler 指示的な... 類似の to the one up on the line identified with "{{1}}".
{$R *.lfm} is a compiler 指示的な that is 挿入するd by the system. Novices should leave it alone.
There is a different compiler 指示的な I recommend 挿入するing. It can go just below the one we've just discussed. It is...
{$R+}
You might think that {$R+} is 関係のある to {$R *.lfm}... but it isn't. (It turns on "範囲 checking", which you can either look up, or just take my word as something that is, for a novice, a Good Thing. Yes, the way will come when いつかs you turn it off... but you can leave that worry for later.)
That's it! That's what's in the first .pdf
If this is the first time you've reached this point in the essay, and you 港/避難所't had the .pdf to read, Click this to go 支援する to where the link to the .pdf 見解/翻訳/版 of the image is, above, and read the text between there and here again. And then we'll start the second .pdf....
The second .pdf shows the same 使用/適用, but after you've 追加するd a button, and created an event handler for the event that is every button's most 一般的に used event... the "Click" event.
As a result of those small 活動/戦闘s, the code has changed. In the .pdf, we have what we had before... now not 最高潮の場面d, and with the previous 言及/関連s like "{{1}}" 除去するd. New 言及/関連s have been 追加するd, new lines... the changes and 新規加入s... have been colored.
{{1}} This is 挿入するd for you when you use the Lazarus GUI to 追加する a button to the form. The button is 割り当てるd the 指名する "Button1", it is an 反対する of "type" "TButton". (You can change the button's 指名する. (And you probably should... make it something meaningful, like "buStartGame", if clicking it would start a game. (The "bu" prefix is 独断的な, my system... but a Good Idea.) You change the 指名する with the 反対する 視察官, and that will take care of さまざまな necessary changes... 含むing changing this line. In general... try to 避ける tinkering 直接/まっすぐに with the code, apart from 追加するing things that can't be 追加するd other ways. So... this line is one you should mostly leave alone. But you will see it. And now you understand what it is, where it comes from.
{{2}} This too was 供給(する)d automatically by the system. That happened when you 二塁打 clicked on the button you'd put on the form, and it is part of creating the handler for Button1's OnClick event.
{{3}} The stuff in light yellow was also 供給(する)d by the system when you 二塁打 clicked on the button.
{{4}} The stuff in dark yellow ("French 情熱" color?) ("//By 手渡す bit...") was typed by 手渡す by the programmer in 告発(する),告訴(する)/料金 of creating the app. The system won't do it all for you!
(Beware... it is 傾向がある to try to "help", by 供給(する)ing "end"s at times I've never fully understood. Just watch out for them. Use them, if you see them in time. 少しのd them, if you get extras!)
The third .pdf shows the same 使用/適用, but after some more work was done. (That work is explained at the 最高の,を越す of the .pdf)
The first line discussed is not the first new line in the code. I've numbered the lines to show you the sequence used while building the new elements into the growing app.
If what I've done and what has appeared where is a little hard to follow, start from here: The changes 単に 追加する a label to the form, and the label shows you how many times the button has been clicked.
The fourth .pdf carries on the good work, as before.
In this step, what you do to move the 事業/計画(する) 今後 is 述べるd at the 最高の,を越す of the .pdf.
その上の to that, a few explanations...
The blue and yellow colors, by the way, here and どこかよそで, are to distinguish things 追加するd to the interface section and things 追加するd to the 実施 section.
{{1}} (Nothing remarkable about this)
{{2}} For a long time, I 嫌疑者,容疑者/疑う, you won't need to 追加する variables or subroutines in any part of the "interface" section other than the "私的な" section. (The 入ること/参加(者)s you are making, by the way, are "今後 宣言s".
Within the "私的な" section, you enter any variable 宣言s FIRST. (They can be in any order) AFTER the variable 宣言s come the subroutine 宣言s. Some will 宣言する 手続きs, some will 宣言する 機能(する)/行事s. They too can be in any order, as long as they are all after the last variable 宣言.
{{3}} All of the code you see has to be typed by 手渡す. You can, of course, use "copy/paste" in the usual way to do the first line with a copy of the earlier 宣言 line. (At {{2c}}). NOTE, however, that in the "実施" section, because of how we've done things... which is The 権利 Way... that "TForm1." has to be 追加するd to the first line of 封鎖する {{3}}. (It will only be TForm1 if you 港/避難所't 改名するd the app's form. It is a good idea to 改名する the form. If I were calling the app "MySpecialThing", I'd call the form fMySpecialThing, and we'd have "TMySpecialThing." to 追加する in 前線 of sDoubleIt, here in the 実施 section. Look at the other things in the section. Find the patterns. Use them. See "TForm1", どこかよそで? If you'd 改名するd the form, you'd see something different where you see TForm1.
{{4}} This is almost unremarkable. It is very like what we did to put the number of clicks on Label1. But that "sDoubleIt" we used so casually wasn't a word that the language understood at the 手始め. We have "追加するd a word to the language" with the code done earlier in this 行う/開催する/段階.
I've written more... much more!... about creating subroutines (手続きs and 機能(する)/行事s) in other, more usual tutorials. In this one, the "take away" (警察などへの)密告,告訴(状) is the things about WHERE stuff goes, WHAT stuff is needed. The other tutorials will help you with the whys and wherefores, and the 詳細(に述べる)s of the "What"s.
You can probably skip downloading this .pdf.
It only shows a change to the 実施 of the 機能(する)/行事.
The 機能(する)/行事 is edited to make it...
機能(する)/行事 TForm1.sDoubleIt:string;
//This is "bad" in several ways! But will do to illustrate SOME things...
var sTmp:string;// 地元の to sDoubleIt {{1}}
begin
sTmp:= inttostr( iCountOfClicks*2); {{2}}
result:=sTmp; {{2}}
end;
But if you want the pdf, this fetches the fifth .pdf.
It finishes things off. You will, I hope, be pleased to see how little is 要求するd.
{{1}} This creates a "地元の variable". Again, the whys and wherefores of 地元の and 全世界の variables are the 支配する of other tutorials. In a nutshell: A 地元の variable can only be "seen" inside the "封鎖する" it was created for, in this 事例/患者 the 機能(する)/行事 "sDoubleIt". This is a Good Thing. Why? See those other tutorials!
{{2}} is the code to multiply the number in the 全世界の variable iCountOfClicks times two, and then 変える the result to a "string type datum". By "result:=sTmp;", we "send" that "支援する" to where ever the app uses "sDoubleIt".
Sorry for the abrupt stop. This has taken hours. and I want to turn to some of the things I've been neglecting. Comments 高く評価する/(相場などが)上がるd!
Search across all my 場所/位置s with the Google search...
|
|
Page 実験(する)d for 同意/服従 with INDUSTRY (not MS-only) 基準s, using the 解放する/自由な, 公然と accessible validator at validator.w3.org. Mostly passes. There were two "unknown せいにするs" in Google+ button code. Sigh.
....... P a g e . . . E n d s .....