Autor Beitrag
Jakane
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 257



BeitragVerfasst: Do 27.02.14 11:06 
Hallo liebe Delphi-Helfer :)

ich habe eine einfache Funktion:

ausblenden 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:
unit globale_funktionen;

interface

uses
  System.SysUtils, System.Classes, Vcl.Dialogs, Vcl.Forms, IniFiles;

  // String-Funktionen
  function _Ordner_zurück(psPfad: String; piAnzahl: Integer): String;

implementation

function _Ordner_zurück(psPfad: String; piAnzahl: Integer): String;
var
  f: Integer;
begin
  // Ordner reduzieren
  for f := 1 to piAnzahl do
  begin
    psPfad := Copy(psPfad, 1, Length(psPfad) - 1);
    psPfad := ExtractFilePath(psPfad);
  end;

  Result := psPfad;
end;

end;


Jetzt sagt mir Delphi XE4 aber das der Bezeichner Result unbekannt ist.
Kann mir das einer erklären? :)

_________________
Die Welt besteht aus Zahlen, also ist alles möglich.
[Delphi 5] - [Delphi XE5]


Zuletzt bearbeitet von Jakane am Do 27.02.14 11:15, insgesamt 2-mal bearbeitet
Nersgatt
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1581
Erhaltene Danke: 279


Delphi 10 Seattle Prof.
BeitragVerfasst: Do 27.02.14 11:11 
Ist die Funktion auch oben im Interfaceteil als Funktion deklariert? Oder als Procedure?

_________________
Gruß, Jens
Zuerst ignorieren sie dich, dann lachen sie über dich, dann bekämpfen sie dich und dann gewinnst du. (Mahatma Gandhi)
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19272
Erhaltene Danke: 1740

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Do 27.02.14 11:13 
user profile iconNersgatt hat folgendes geschrieben Zum zitierten Posting springen:
Ist die Funktion auch oben im Interfaceteil als Funktion deklariert? Oder als Procedure?
Das sollte ja egal sein.

Die Funktion an sich ist so jedenfalls korrekt, zumindest syntaktisch. Das muss etwas mit dem Kontext zu tun haben. Pack die einfach einmal ohne irgendetwas anderes in ein neues Projekt? Geht sie dann?
Jakane Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 257



BeitragVerfasst: Do 27.02.14 11:17 
In einem neuen Projekt funktioniert das...

Und woran liegt das nu... *seufz*

Edit:
Ich habe die Haupt und das Projekt neu zusammengesetzt.
Jetzt gehts wieder.

_________________
Die Welt besteht aus Zahlen, also ist alles möglich.
[Delphi 5] - [Delphi XE5]
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6386
Erhaltene Danke: 146

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Do 27.02.14 11:24 
user profile iconJakane hat folgendes geschrieben Zum zitierten Posting springen:
Und woran liegt das nu... *seufz*

An einem Compiler-Schalter:
docwiki.embarcadero....erte_Syntax_(Delphi)