Ich bin kurz vorm ausrasten deswegen wede ich mich an euch
ich habe folgendes prob
mein code ...
Delphi-Quellcode:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 =
class(TForm)
Edeingabe: TEdit;
EdAusgabe: TEdit;
LabGray: TLabel;
LabDez: TLabel;
btnberechnen: TButton;
procedure btnberechnenClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
type Tbinaer = 0..1;
Tgray =
record
spur1:Tbinaer;
spur2:Tbinaer;
spur3:Tbinaer;
spur4:Tbinaer;
spur5:Tbinaer;
spur6:Tbinaer;
spur7:Tbinaer;
spur8:Tbinaer;
end;
TGrayTabelle =
array[0..255]
of Tgray;
procedure TForm1.FormCreate(Sender: TObject);
var i,x:integer;grtab:Tgraytabelle;
begin
i := 0;
//.......SPUR8.......\\
repeat
grtab[i].spur8:= 0;
inc(i);
x:= 1;
repeat
grtab[i].spur8:= 1;
inc(x);
inc(i)
until (x = 2)
or (i=255);
grtab[i].spur8:= 0 ;
inc(i);
until i= 255;
//.......SPUR7.......\\
i:= 0;
repeat
x:= 1;
repeat
grtab[i].spur7:= 0;
inc(x);
inc(i)
until (x = 2)
or (i=255);
x:= 1;
repeat
grtab[i].spur7:= 1;
inc(x);
inc(i)
until (x = 4)
or (i=255);
x:= 1;
repeat
grtab[i].spur7:= 0;
inc(x);
inc(i)
until (x = 2)
or (i=255);
until i = 255;
//.......SPUR6.......\\
i:= 0;
repeat
x:= 1;
repeat
grtab[i].spur6 := 0;
inc(x);
inc(i)
until (x = 4)
or (i=255);
x:= 1;
repeat
grtab[i].spur6:= 1;
inc(x);
inc(i)
until (x = 8)
or (i=255);
x:= 1;
repeat
grtab[i].spur6:= 0;
inc(x);
inc(i)
until (x = 4)
or (i=255);
until i = 255;
//.......SPUR5.......\\
i:= 0;
repeat
x:= 1;
repeat
grtab[i].spur5:= 0;
inc(x);
inc(i)
until (x = 8)
or (i=255);
x:= 1;
repeat
grtab[i].spur5:= 1;
inc(x);
inc(i)
until (x = 16)
or (i=255);
x:= 1;
repeat
grtab[i].spur5:= 0;
inc(x);
inc(i)
until (x = 8)
or (i=255);
until i = 255;
//.......SPUR4.......\\
i:= 0;
repeat
x:= 1;
repeat
grtab[i].spur4:= 0;
inc(x);
inc(i)
until (x = 16)
or (i=255);
x:= 1;
repeat
grtab[i].spur4:= 1;
inc(x);
inc(i)
until (x = 32)
or (i=255);
x:= 1;
repeat
grtab[i].spur4:= 0;
inc(x);
inc(i)
until (x = 16)
or (i=255);
until i = 255;
//.......SPUR3.......\\
i:= 0;
repeat
x:= 1;
repeat
grtab[i].spur3:= 0;
inc(x);
inc(i)
until (x = 32)
or (i=255);
x:= 1;
repeat
grtab[i].spur3:= 1;
inc(x);
inc(i)
until (x = 64)
or (i=255);
x:= 1;
repeat
grtab[i].spur3:= 0;
inc(x);
inc(i)
until (x = 32)
or (i=255);
until i = 255;
//.......SPUR2.......\\
i:= 0;
repeat
x:= 1;
repeat
grtab[i].spur8:= 0;
inc(x);
inc(i)
until (x = 64)
or (i=255);
x:= 1;
repeat
grtab[i].spur2:= 1;
inc(x);
inc(i)
until (x = 128)
or (i=255);
x:= 1;
repeat
grtab[i].spur2:= 0;
inc(x);
inc(i)
until (x = 64)
or (i=255);
until i = 255;
//.......SPUR1.......\\
i:= 0;
repeat
x:= 1;
repeat
grtab[i].spur1:= 0;
inc(x);
inc(i)
until (x = 128)
or (i=255);
x:= 1;
repeat
grtab[i].spur1:= 1;
inc(x);
inc(i)
until (x = 256)
or (i=255);
x:= 1;
repeat
grtab[i].spur1:= 0;
inc(x);
inc(i)
until (x = 128)
or (i=255);
until i = 255;
end;
beim starten kommt folgender fehler :
Zitat:
Projekt projekt1.exe raised
exception class EAccessViolation with message'
access violation at address 00450725 in module 'Projekt1.exe'. Write of address 00130005'.Process stopped. Use Step or Run to continue.
Warum ? ?
Wenn ich alles ab SPUR6 ausklammer dann gehts woran liegt es also ? Habe ich etwas übersehen ? Bitte um Hilfe ! ! THX im vorraus
[edit=Luckie] Mfg, Luckie[/edit]