Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi array als function ergebnis? (https://www.delphipraxis.net/90848-array-als-function-ergebnis.html)

gandime 24. Apr 2007 20:48


array als function ergebnis?
 
hi,
wie kann ich ein Array als Ergebnis einer Funktion bekommen?
die Funktion befindet sich allerdings in einer anderen unit!

wie geht das?^^

mfg gandime

mkinzler 24. Apr 2007 20:49

Re: array als function ergebnis?
 
Erzeuge eine Typ für den Array

gandime 24. Apr 2007 21:13

Re: array als function ergebnis?
 
so das habe ich jetzt gemacht aber wie kann ich den wert übergeben?

Delphi-Quellcode:
type
TIntegerArray = array[0..8] of Integer;
Delphi-Quellcode:
function genug_ress(s_wovon:string):TIntegerArray;
Delphi-Quellcode:
var
  ia_temp:array[0..8] of integer;
begin
  ia_temp:=genug_ress('lala');
Zitat:

[Pascal Error] unt_werft.pas(92): E2010 Incompatible types: 'Array' and 'TIntegerArray'
was mache ich falsch?

mkinzler 24. Apr 2007 21:15

Re: array als function ergebnis?
 
Delphi-Quellcode:
var
  ia_temp: TIntegerArray;

gandime 24. Apr 2007 21:38

Re: array als function ergebnis?
 
danke :-)


Alle Zeitangaben in WEZ +1. Es ist jetzt 11:02 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