Autor Beitrag
fuman
Hält's aus hier
Beiträge: 5



BeitragVerfasst: Di 16.09.08 18:16 
Hallo,
mir wurde öfters gesagt das ich proceduren in meinen Programmen verwenden sollte.
nunja es ist lang her als ich das, dass lezte mal gemacht habe.
deshalp wollt ich mal nachfragen obs mir nochmal jemand erklären kann.
also wo ich die deklariere, was ich schreiben muss und und und...
ich arbeite im moment noch mit recht kleinen programmen wie Taschenrechner o.ä.
Das gleiche problem habe ich mit den konstanten.
MFG
fuman


Moderiert von user profile iconNarses: Topic aus VCL (Visual Component Library) verschoben am Di 16.09.2008 um 18:24
j.klugmann
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Di 16.09.08 18:19 
Lese am besten mal Chistian Stellmanns Grundlagen Tutorial.Suche mit der Forum-Suche oder mit Google.
Jakob_Ullmann
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1747
Erhaltene Danke: 15

Win 7, *Ubuntu GNU/Linux*
*Anjuta* (C, C++, Python), Geany (Vala), Lazarus (Pascal), Eclipse (Java)
BeitragVerfasst: Di 16.09.08 18:33 
@Konstanten, nach dem Schlüsselwort "const", wie "var", bloß halt davor. Es gibt echte und typisierte Konstanten:

ausblenden Delphi-Quelltext
1:
2:
3:
const
  a = 5// Echte Konstante
  b: Integer = 5// Typisierte Konstante


@Prozeduren: Deklarierst du im type-Bereich und schreibst sie dann in den implementation-Bereich.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
...

type
  procedure A(argument: string; argument2: Integer; argument3, argument4: Boolean);
  ...
  TForm1 = class(TForm)
    ...
  private
    procedure B;
  end;

implementation

...

procedure A(argument: string; argument2: Integer; argument3, argument4: Boolean);
begin
  ...
end;

...
procedure TForm1.B;
begin
  ...
end;

...

end.


Zuletzt bearbeitet von Jakob_Ullmann am Di 16.09.08 18:37, insgesamt 1-mal bearbeitet
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 480

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Di 16.09.08 18:34 
user profile iconj.klugmann hat folgendes geschrieben:
Lese am besten mal Chistian Stellmanns Grundlagen Tutorial.Suche mit der Forum-Suche oder mit Google.


Na, so findet man das aber nicht. Der Typ heißt user profile iconChristian Stelzmann. :mrgreen:

_________________
We are, we were and will not be.
j.klugmann
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Di 16.09.08 18:40 
Mist!Ich war mir nicht sicher und habe mich dann für das entschieden. :oops: