Autor Beitrag
Biarchiv
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 688



BeitragVerfasst: Fr 15.08.03 19:22 
Hallo,

Bekomme folgende Warnungen. Programm läuft aber ohne Probleme

[Warnung] uOption.pas(79): Variable 'b' wurde wahrscheinlich nicht Initialisiert
b := ini.ReadBool('Program','FilePicture',b); //Zeile 79
CheckBox1.checked := b;


[Warnung] uOption.pas(100): Variable 'i' wurde wahrscheinlich nicht Initialisiert
i := ini.ReadInteger('Program','Size',i); //Zeile 100
MainForm.FileListBox1.Font.Size := i;
Mainform.DirectoryListBox1.Font.Size := i;

Danke...

Bye
AndyB
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1173
Erhaltene Danke: 14


RAD Studio XE2
BeitragVerfasst: Fr 15.08.03 19:26 
Zitat:
b := ini.ReadBool('Program','FilePicture',b); //Zeile 79

Du übergibst hier b an ReadBool. b wurde aber zu diesem Zeitpunkt noch kein Wert zugewiesen und wenn somit Progam->FilePicture nicht existiert, bekommst du einen zufälligen Wert, der gerade in b steht.

_________________
Ist Zeit wirklich Geld?
Biarchiv Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 688



BeitragVerfasst: Fr 15.08.03 19:35 
Hallo,

Ahh,,, Danke.

Wie könnte ich das korrigieren?
Aya
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1964
Erhaltene Danke: 15

MacOSX 10.6.7
Xcode / C++
BeitragVerfasst: Fr 15.08.03 19:45 
Hi,

Biarchiv hat folgendes geschrieben:
Wie könnte ich das korrigieren?

Einfach indem du für das b in ReadBool einen festern Wert (True/False) benutzt.

Au'revoir,
Aya~

_________________
Aya
I aim for my endless dreams and I know they will come true!