Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass var array of byte Type mismatch #263

Open
breitsch2 opened this issue Oct 21, 2022 · 2 comments
Open

Pass var array of byte Type mismatch #263

breitsch2 opened this issue Oct 21, 2022 · 2 comments

Comments

@breitsch2
Copy link

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
Copy link

Alekcvp commented Jan 9, 2023

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
Copy link

Right with RegisterMethod('Procedure Compute( var pInput : TBytes)'); explicitly it works, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants