Autor Beitrag
bruder jonas
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 76



BeitragVerfasst: Mi 23.04.03 16:33 
hallo,

eine dumme frage, aber ich komm im moment nicht drauf

ich will 2 uhrzeiten in ein 2stelliges array schreiben. wie mache ich das? wie deklariere ich das array?

array[0] := time; ???? oder wie?

und wie kann ich auf die arrayinhalte dann wieder zugreifen??

danke vielmals
TheNeon
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 408

Windows
VS2010 C#
BeitragVerfasst: Mi 23.04.03 16:55 
sorry, aber ICH persönlich verstehe nicht was du willst ..... :?
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Mi 23.04.03 16:59 
Ich auch nicht, aber ich antworte jetzt einfach mal reflexartig, wie ich immer bei dem Wort "Array" antworte:

in der Abteilung "Tutorials" gibt es auch ein Tutorial zu Arrays. Ein wunderbares Tutorial verfasst von einem wunderbaren Menschen!

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
Blackout
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 64



BeitragVerfasst: Mi 23.04.03 17:14 
hi bruder jonas,
das kannst du doch mit Strings machen.

Hier maln beispiel:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
Procedure TForm1.Button1Click(Sender: TObject);

Var
  Time: Array[1..2] Of String;
  Jetzt: TDateTime;
  
Begin

  Time[1]:= TimeToStr(Now);

  // Besser:
  Time[2]:= FormatDateTime('hh:mm:ss', Now);

  // so z.B. auslesbar:
  Label1.Caption:= Time[2];
  // Oder
  Jetzt:= StrToTime(Time[2]);  

End;

_________________
MfG Blackout
bruder jonas Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 76



BeitragVerfasst: Mi 23.04.03 17:46 
Titel: danke, das war es.
jetzt seh ich wie es geht

danke