![]() |
Problem bei Alarm abfrage
Hi, ich wollte eine Alarmfunktion in ein Programm einbauen. Aber ich bekomme immer den Fehler
Zitat:
Delphi-Quellcode:
Die Variablen:
DBT_Min_A := (MainForm.ENV_DBT <> negInfinity) and DBT_Alert.Checked and EnDBT_Min.Checked and (MainForm.ENV_DBT < DBT_Min);
DBT_Min_A ist ein Boolean Mainform.ENV_DBT ist die Variable die mit den mindeststand verglichen werden soll (Typ Extended) DBT_Min ist der Mindeststand (Typ Extended) DBT_Alert, und EnDBT_Min sind vom Typ TCheckbox die zum aktivieren des Alarms dienen Ich bin schon die ganze Zeit am überlegen wo der Fehler ist aber ich kommt nicht weiter :wall: mfg Robin |
Re: Problem bei Alarm abfrage
Was für einen Typ hat negInfinity?
Versuche mal zu isolieren in welchem Teilterm der Fehler auftritt |
Re: Problem bei Alarm abfrage
Zitat:
Ich habs mal weiter eingegrenzt auf diesen Teil:
Delphi-Quellcode:
and (MainForm.ENV_DBT < DBT_Min);
|
Re: Problem bei Alarm abfrage
Hallo,
geht denn das ?
Delphi-Quellcode:
Wenn ja, machst du etwas anderes falsch.
if (MainForm.ENV_DBT < DBT_Min) then
begin end; Reduzier mal deinen Code auf das Minimum und poste ihn hier. Heiko |
Re: Problem bei Alarm abfrage
ich hab mein Fehler gefunden
Delphi-Quellcode:
Durch das with hat der ein Edit Feld, was auf DeepthAlertDlg, DBT_Min heißt abgefragt und nich die Variable DBT_Min :oops:
with DeepthAlertDlg do
begin DBT_Min_A := (MainForm.ENV_DBT <> negInfinity) and DBT_Alert.Checked and EnDBT_Min.Checked and (MainForm.ENV_DBT < DeepthDlg.DBT_Min); [...] Thx für die schnelle hilfe :cheers: |
Re: Problem bei Alarm abfrage
Deshalb vermeide ich die Verwendung von with
|
Re: Problem bei Alarm abfrage
Hallo,
wenn man anständig mit Prefixen arbeitet, passiert auch beim with nix. Edit_Name CB_bChecked usw. Heiko |
Re: Problem bei Alarm abfrage
Auch wenn es jetzt nichts mit deinem Fehler zu tun hat:
Delphi-Quellcode:
(aus der math.pas)
{ The following constants should not be used for comparison, only
assignments. For comparison please use the IsNan and IsInfinity functions provided below. } NaN = 0.0 / 0.0; (*$EXTERNALSYM NaN*) (*$HPPEMIT 'static const Extended NaN = 0.0 / 0.0;'*) Infinity = 1.0 / 0.0; (*$EXTERNALSYM Infinity*) (*$HPPEMIT 'static const Extended Infinity = 1.0 / 0.0;'*) NegInfinity = -1.0 / 0.0; (*$EXTERNALSYM NegInfinity*) (*$HPPEMIT 'static const Extended NegInfinity = -1.0 / 0.0;'*) |
Alle Zeitangaben in WEZ +1. Es ist jetzt 00:34 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz