Autor Beitrag
Hazer
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 54

Win XP Pro SP2
Turbo Delphi 2006
BeitragVerfasst: Do 07.04.05 19:10 
hi,
hab mal ne frage.
geht das, dass ich eine variabel, die in einer Funktion/Prozedur benutzt wird, in den normalen Programmcode holen kann?

Ich mein wenn ich ein Prozedur habe, darin werden variabeln bearbeitet. Kann ich diese dann im programmcode aubrufen.
Das wichtigste ist, dass ich keine Globalen variabeln für das Prog benutzen darf.
Geht das?

_________________
I was too weak to fight | once more i let go
it is a black session | an invitation of sorts
uall@ogc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1826
Erhaltene Danke: 11

Win 2000 & VMware
Delphi 3 Prof, Delphi 7 Prof
BeitragVerfasst: Do 07.04.05 19:15 
nein da sie auf den stack gelegt werden
du könntest aber eine große procedure machen in der mehrere kleine sind, dann hast du sozusagen auch "globale" variablen die aber keine sind


ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
procedure aha;

var hallo: integer;  //locale variable kann aber aber auch von der prozedur machwas abgferagt werden

procedure machwas;
begin
  hallo := 1;
end;



begin
  machwas;
end;

_________________
wer andern eine grube gräbt hat ein grubengrabgerät
- oder einfach zu viel zeit
Hazer Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 54

Win XP Pro SP2
Turbo Delphi 2006
BeitragVerfasst: Do 07.04.05 19:16 
8)
Jeah, den Lehrer ausgetrickst :D
Das nenn ich doch was muahahahaha :twisted:

Danke für den Tipp

_________________
I was too weak to fight | once more i let go
it is a black session | an invitation of sorts