HomeDelphiDelphi Error – E2454 Slice standard function not allowed for VAR nor OUT argument

Delphi Error – E2454 Slice standard function not allowed for VAR nor OUT argument

Delphi Compiler Error

E2454 Slice standard function not allowed for VAR nor OUT argument

Reason for the Error & Solution

You cannot write back to a slice of an array, so you cannot use the slice standard function to pass an argument that is var or out. If you must modify the array, either pass in the full array or use an array variable to hold the desired part of the full array.

Share:

Leave a Reply

You May Also Like

Delphi Compiler Error X2421 Imported identifier ‘%s’ conflicts with ‘%s’ in ‘%s’ Reason for the Error & Solution This occurs...
Delphi Compiler Error X2367 Case of property accessor method %s.%s should be %s.%s Reason for the Error & Solution No...
Delphi Compiler Error X2269 Overriding virtual method ‘%s.%s’ has lower visibility (%s) than base class ‘%s’ (%s) Reason for the...