Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   FreePascal (https://www.delphipraxis.net/74-freepascal/)
-   -   Fatal: Syntax error, . expected but ( found (https://www.delphipraxis.net/125297-fatal-syntax-error-expected-but-found.html)

holle 3. Dez 2008 20:10


Fatal: Syntax error, . expected but ( found
 
Liste der Anhänge anzeigen (Anzahl: 2)
Ich habe gerade ein Problem. Pascal zeigt mir beim kompilieren folgenden Fehler:
Code:
19 / 25 remove~1.pas Fatal: Syntax error, . expected but ( found
Ich habe keine Ahnung was damit gemeint ist. Hier der Quelltext:
Delphi-Quellcode:
program removeMax;
uses
    sentinel, crt;

var
    myList1, myList2, myList3, myList4: List;

begin
    myList1 := insert(1, insert(2, insert(3, insert(4, insert(5, init)))));
    myList2 := insert(2, insert(5, insert(3, insert(1, insert(5, init)))));
    myList3 := insert(3, insert(3, insert(3, init)));
    myList4 := init;

    print('myList1', myList1);
    print('myList2', myList2);
    print('myList3', myList3);
    print('myList4', myList4);

    myList1 := removeMax(myList1); // Zeile 19


    readln;
end.
Könnt ihr mir weiterhelfen? Ich habe echt schon ewig davor gehangen :/ Im Anhang ist das Programm nochmal als Datei.

Meflin 3. Dez 2008 20:12

Re: Fatal: Syntax error, . expected but ( found
 
Spontan fällt mir auf, dass sowohl dein program als auch deine Funktion scheinbar RemoveMax heißen - ist sowas denn erlaubt :gruebel:

mkinzler 3. Dez 2008 20:13

Re: Fatal: Syntax error, . expected but ( found
 
Deine Unit heisst RemoveMax und du versuchst eine Funktion mit dem selben Namen aufzurufen

holle 3. Dez 2008 20:17

Re: Fatal: Syntax error, . expected but ( found
 
DANKE! das wäre mir ewig nicht aufgefallen! echt super schnelle antwort! danke!


Alle Zeitangaben in WEZ +1. Es ist jetzt 02:18 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz