Autor Beitrag
sveno
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 40



BeitragVerfasst: Do 16.09.04 19:36 
Ja Hallo:)

Wir sollen für die Schule einen Routenplaner programmieren, hab eigentlich soweit alles fertig, aber ich kriege eine Fehlermeldung nicht weg:(

Hier mal ein Screen:
www.bankofchina.de/g...ll_Idiot/Delphi1.JPG

Die procedure ist im unit UADS, unser Lehrer hat auch gesagt das sie da bleiben soll.:/

Weiss jemand was ich ändern muss?

Gruss Sven:)
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Do 16.09.04 19:43 
Du musst im Uses-Teil Deiner Unit die Unit UADS einbinden.
sveno Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 40



BeitragVerfasst: Do 16.09.04 19:46 
jasocul hat folgendes geschrieben:
Du musst im Uses-Teil Deiner Unit die Unit UADS einbinden.


Sry, vergessen zu erwähnen das ich das bereits gemacht hab.
Müsste eigentlich korrekt so sein oder:
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Spin, Grids, UADS;
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Do 16.09.04 19:49 
Dann prüfe mal, ob Du wirklich richtig geschrieben hast (Tippfähler). Am besten in die Unit UADS gehen und mit Cpoy und Paste in die andere Unit schreiben. Sowas passiert glaube ich jedem regelmäßig. Mann überliest solche Tippfehler bestimmt 5 bis 6 mal.
sveno Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 40



BeitragVerfasst: Do 16.09.04 19:52 
nope, daran lags auch nicht:(
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Do 16.09.04 20:08 
Kannst du mal das Interface der beiden Units posten?

*Glaskugelraushol*

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
sveno Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 40



BeitragVerfasst: Do 16.09.04 20:10 
Gerne doch:)

URoutenplaner:

ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
interface

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

type
  TFrmRoutenplaner = class(TForm)
    BtBeenden: TButton;
    StrGrdbestweg: TStringGrid;
    StrGrdMatrix: TStringGrid;
    SpEdAnzahl: TSpinEdit;
    LbAnzahl: TLabel;
    LBZiel: TLabel;
    LBStart: TLabel;
    SpEdZiel: TSpinEdit;
    SpEdStart: TSpinEdit;
    StrGrdBestentfernung: TStringGrid;
    BtBerechne: TButton;
    procedure BtBeendenClick(Sender: TObject);
    procedure SpEdAnzahlChange(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure BtBerechneClick(Sender: TObject);
    procedure SpEdStartChange(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  FrmRoutenplaner: TFrmRoutenplaner;



UADS:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
interface

type
 TMatrix = Array[1..13,1..13] of Integer;
var
 Verbindungen : TMatrix;

type
 TWeg = Array[1..13] of Integer;
var
 Weg, Bestweg : TWeg;

type
 Tbesucht = Array[1..13] of boolean;
var
 besucht : Tbesucht;

var
 AnzahlOrte, Startort, Zielort, MomOrt,Entfernung, Bestentfernung, Schritte  : Integer;


Zuletzt bearbeitet von sveno am Do 16.09.04 20:34, insgesamt 1-mal bearbeitet
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Do 16.09.04 20:29 
Du musst in der UADS-Unit die Procedures noch alle im Interface-Teil eintragen, da er diese ansonsten nich öffentlich für die andere Unit nutzbar macht.

Ansonsten bitte deinen Source in Delphi-Tags umschließen.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
sveno Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 40



BeitragVerfasst: Do 16.09.04 20:32 
thx erstmal:)

Hab die jetzt so ins interface eingefügt:

interface

type
procedure finde_den_besten_weg;

Aber wies aussieht ist das falsch so^^ Wie muss ich die da eintragen?
GSE
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 740

Win 2k, Win XP Pro
D5 Prof, D6 Ent, D2k5 PE
BeitragVerfasst: Do 16.09.04 20:34 
hat UADS 'ne Form, dann musst du's ins public schreiben. ansonsten musst du im interfaceteil die prozedur nochmal deklarieren, da sie sonst nur unit-intern verfügbar ist.

[edit]mist zu langsam, abe rnimm mal das type weg (ne prozedur ist doch keine klasse[/edit]

mfg
GSE

_________________
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs
and the universe trying to produce bigger and better idiots. So far, the universe is winning. (Richard Cook)
sveno Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 40



BeitragVerfasst: Do 16.09.04 20:40 
Ahh, thx, es klappt nun:)

Scheint zwar noch ein bisschen falsch programmeirt zu sein, aber das krieg ich auch noch hin^^