Ver Mensaje Individual
  #9  
Antiguo 25-01-2011
llSnakell llSnakell is offline
Miembro
NULL
 
Registrado: ene 2011
Posts: 73
Reputación: 14
llSnakell Va por buen camino
Hola Caral
Sabes que utilize Numeros Decimales, Con variables Real y utilize StrToFloat Pero Igual Me Aparece Error Puedes Revisarlo ???

Código Delphi [-]
unit Unit1;

interface

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

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

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
  N1,N2,Total:Real;
begin
  N1:=StrToFloat(Edit1.text);
  N2:=StrToFloat(Edit2.Text);
  Total:=N1+N2;
  Label4.Caption:=FloatToStr(Total);// ¿Como Puedo Hacer Para Colocar Un comentario? Solo Aparece el Numero
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  Close;
end;

end.

Última edición por ecfisa fecha: 25-01-2011 a las 04:13:30. Razón: Etiquetas, identado
Responder Con Cita