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

J9 doesn't convert arguments before cd call #183

Open
jip opened this issue Feb 22, 2024 · 1 comment
Open

J9 doesn't convert arguments before cd call #183

jip opened this issue Feb 22, 2024 · 1 comment

Comments

@jip
Copy link

jip commented Feb 22, 2024

https://code.jsoftware.com/wiki/Guides/DLLs/Calling_DLLs says: "Arguments are converted as required to conform with their declaration type.". It was definitely true for j807/j64/linux, but not for j9.6.0-beta1/j64/linux.

Details are in jsoftware/math_lapack2@6ab70f0 which fixes a bug just catched. In short, if external DLL procedure expects an argument as array of datatype integer (e.g. (,2)), but an array of type float (e.g. (,2.0)) was sent, then J807 converts argument and cd calls procedure successively, but J9.6 throws "domain error in cd, executing dyad 15!:0". (cder '') returns error 6 x ("parameter x type doesn't match declaration").

@bilam
Copy link
Contributor

bilam commented Aug 4, 2024

IMO the documentation needs a change. IMO the current behavior is better and safer.

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

2 participants