AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Temperatur Umrechner

Ein Thema von jens106 · begonnen am 21. Sep 2009 · letzter Beitrag vom 22. Sep 2009
Antwort Antwort
Teekeks

Registriert seit: 19. Okt 2008
Ort: Dresden
765 Beiträge
 
FreePascal / Lazarus
 
#1

Re: Temperatur Umrechner

  Alt 21. Sep 2009, 17:28
Delphi-Quellcode:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Edit1: TEdit;
    ComboBox1: TComboBox;
    Label1: TLabel;
    Button1: TButton;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    ComboBox2: TComboBox;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var zahl, ergebnis : integer;
begin
   zahl :=StrToInt(Edit1.text);

   // Kontrolle auf neue Edit Box

   if ComboBox1.text='C° (Celsius)then
      begin
         if ComboBox2.text='K (Kelvin)then
            begin
               ergebnis:=zahl+273;
               Edit1.Text:= IntToStr(ergebnis);
            end
         else
            begin
            end; //hier fehlte ein semicolon...
       end
   else
      begin
      end; //hier fehlte ein semicolon...

   // Kontrolle auf neue Edit Box

   if ComboBox1.text='C° (Celsius)then // hier kommt immer der Fehler
      begin
         if ComboBox2.text='K (Kelvin)then
            begin
               ergebnis:=zahl+273;
               Edit1.Text:= IntToStr(ergebnis);
            end
         else
            begin
            end; //hier fehlte ein semicolon...
       end
   else
      begin
      end; //hier fehlte ein semicolon...


end;

end.
Peter
"Div by zero Error" oder auch: "Es geht auch ohne Signatur!".
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 04:44 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 by Thomas Breitkreuz