Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Delphi MinIntValue vereinfachen (https://www.delphipraxis.net/66705-minintvalue-vereinfachen.html)

Hallo_Thomas 2. Apr 2006 21:18


MinIntValue vereinfachen
 
Hallo, kann ich MinIntValue irgendwie vereinfachen?


Beispiel
Delphi-Quellcode:
MinIntValue([C[1],C[2],C[3],C[4],C[5],C[6],C[7],C[8],C[9]])
irgendwie so
Delphi-Quellcode:
MinIntValue([C[1]..C[9]])

jim_raynor 2. Apr 2006 21:22

Re: MinIntValue vereinfachen
 
Wenn C schon ein Array of Integer ist versuche es doch einfach mal mit
Delphi-Quellcode:
MinIntValue(C)
;)

KingIR 2. Apr 2006 21:24

Re: MinIntValue vereinfachen
 
Slice könnte evtl. helfen, wenn du nur einen Teilbereich des Arrays brauchst.

Delphi-Quellcode:
MinIntValue(Slice(C, 10));
Delphi-Hilfe:
Zitat:

Delphi-Quellcode:
function Slice(var A: Type; Count: Integer): Pointer;
In Delphi code, use Slice to select a sub-section (slice) of an array to be passed as an open array parameter. Slice is only allowed as a parameter in a call to a procedure or function that expects an open array parameter. Slice selects the first Count elements of the array given by A to be passed as an open array parameter. A can be an open array parameter itself, allowing dynamically allocated arrays to be passed to open array parameters.

Hallo_Thomas 2. Apr 2006 21:38

Re: MinIntValue vereinfachen
 
Jo Danke, das Slice wird mir echt weiterhelfen!, Danke


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