Autor Beitrag
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 01.05.07 15:51 
Hi Leute,

nach einmonatiger Pause melde ich mich nun auch mal wieder.
Ich habe mir überlegt, sowas wie eine Ergänzung zu Math.dcu zu schreiben. (Die Unit hat ja jeder)
Da wollte ich z.B. einige Funktionen (wie zum Beispiel "tan" aus Math) unterbringen.

MEIN PROBLEM:

Wie muss ich die Funktion anmelden? Ich kann doch bestimmt nicht einfach in den Implementation-Part
"function DoThat(X: Extended): Extended;" schreiben, ohne vorher was davon zu sagen bzw. zu schreiben.
Wäre für eine Antwort sehr dankbar.

Tschüss und danke schonmal
____________________
Jakob U.

PS: Eine Unit ohne Formular.
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Di 01.05.07 19:13 
Um Funktionen global bereitzustellen müssen diese im Interface-Teil Deklariert und im Implementations-Teil definiert werden.

Wenn Du nur etwas lokal brauchst, reicht es, diese Funktion im Implementations-Teil zu Deklarieren und Definieren.

Wie das im Einzelnen aussieht findest Du in der Delphi-Hilfe in der "Object Pascal Reference" ...

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
Jakob_Ullmann Threadstarter
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: Mi 02.05.07 13:40 
Bei mir gibt's nur "Delphisprachreferenz". - Aber ich glaube, früher hieß es Object Pascal.
Also aus dem Teil der Delphi 7-Hilfe werde ich einfach nicht schlau - da habe ich auch schon geguckt.
Deshalb hab ich ja gefragt. - Und ich bin schlau draus geworden. - Danke!

Vielen Dank!
____________________
Jakob U.