Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #6  
Antiguo 17-03-2012
MiguelR MiguelR is offline
Registrado
NULL
 
Registrado: ene 2012
Posts: 1
Poder: 0
MiguelR Va por buen camino
invalid floating point operation

a mi me marca ese problema con este código, soy nuevo y no se mucho, agradecería mucho la ayuda
Código:
unit Unit1;

interface

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

type
  TForm1 = class(TForm)
    Edit1: TEdit;
    Edit2: TEdit;
    Memo1: TMemo;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
m:array[1..10,1..10] of extended;
v:array[1..10] of extended;
a,i,j,x,z:integer;
k,b:extended;
linea:string;
archivo:textfile;
begin
    a:=strtoint(edit2.text);
    assignfile(archivo,edit1.text);
    reset(archivo);
    for i:=1 to a do
    for j:=1 to a do
    read(archivo,m[i,j]);

    z:=1;
    x:=1;
    b:=1;
    k:=0;
    while i<>a do begin
        for i:=z to (z+1) do begin
            k:=m[i,j];
            b:=b*k;
            for j:=x to a do begin
                v[j]:=(m[i,j])/(k);
            end;
        end;
        for i:=i+1 to a do begin
            k:=m[i,j];
            for j:=j to a do begin
                if k<>0 then
                m[i,j]:=((v[j])/(k))+m[i,j]
                else break;
            end;
        end;

        z:=z+1;
        x:=x+1;
    end;

    m[i,j]:=(m[i,j])*b;
    memo1.lines.add(floattostr(m[i,j]));
end;

end.
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro


La franja horaria es GMT +2. Ahora son las 19:08:09.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi