Pass var array of byte Type mismatch
breitsch2 opened this issue · 2 comments
breitsch2 commented
Registered a method
RegisterMethod('Procedure Compute( var pInput : array of byte)');
RegisterMethod(@TNNetFullConnect.Compute, 'Compute');
and in script call we got a type mismatch
BAInput: array of byte;
NN.Compute(BAInput);
Alekcvp commented
Declare a type (if it doesn't exist yet):
type
TBytes = array of Byte;
and use it for your parameters and variables. The "array of" expression has different meanings when defining a function and a variable (same as in delphi).
maxkleiner commented
Right with RegisterMethod('Procedure Compute( var pInput : TBytes)'); explicitly it works, thanks.