We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
For example, x = zeros(dim1, dim2, ...) function.
x = zeros(dim1, dim2, ...)
We add a flag to the function, this flag is consistent with the precision of the return value.
x = zeros(dim1, dim2, ..., flag)
ref from: https://fortran-lang.discourse.group/t/fortran-function-return-value-polymorphism/1350/5
But we found that this method is actually not good for the user experience. We want to find other ways.
We can abandon the idea of a polymorphic function interface and set up the following functions:
szeros / dzeros / qzeros default: zeros = szeros
Maybe we can imitate the standard function of Fortran, the real function. ref from:
real
real(integer, kind)
Should we implement the second method first. It will be more difficult to implement the third method? May need to use c/c++, so we need to ensure that fpm can build such code. fortran-lang/fpm#353 https://github.com/fortran-lang/fpm/tree/master/example_packages/with_c
fpm
Or do we have a better way?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
For example,
x = zeros(dim1, dim2, ...)
function.flag
We add a flag to the function, this flag is consistent with the precision of the return value.
x = zeros(dim1, dim2, ..., flag)
ref from: https://fortran-lang.discourse.group/t/fortran-function-return-value-polymorphism/1350/5
But we found that this method is actually not good for the user experience. We want to find other ways.
function name
We can abandon the idea of a polymorphic function interface and set up the following functions:
real(integer, kind)
Maybe we can imitate the standard function of Fortran, the
real
function.ref from:
Final question
Should we implement the second method first. It will be more difficult to implement the third method? May need to use c/c++, so we need to ensure that
fpm
can build such code.fortran-lang/fpm#353
https://github.com/fortran-lang/fpm/tree/master/example_packages/with_c
Or do we have a better way?
The text was updated successfully, but these errors were encountered: