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

parser fails to assign type to logical funtions #43

Closed
wsmorgan opened this issue May 14, 2015 · 2 comments
Closed

parser fails to assign type to logical funtions #43

wsmorgan opened this issue May 14, 2015 · 2 comments

Comments

@wsmorgan
Copy link
Collaborator

code:
function is_equiv_lattice(lat1,lat2,eps)
real(dp), intent(in) :: lat1(3,3), lat2(3,3), eps
logical is_equiv_lattice, err
real(dp) :: lat1inv(3,3), S(3,3)
integer i
is_equiv_lattice = .false.
call matrix_inverse(lat1,lat1inv,err)
if (err) stop "Problem with input vectors in function 'is_equiv_lattice'"
S = matmul(lat1inv,lat2)
if (equal(abs(determinant(S)),1._dp,eps) .and. &
equal(S,nint(S),eps)) is_equiv_lattice = .true.
endfunction is_equiv_lattice

fortpy compile log:

is_equiv_lattice.f90:10.2:

None :: is_equiv_lattice_fpy

@rosenbrockc
Copy link
Owner

This issue is caused by the lack of :: after the logical keyword defining the output type of the function. If we decide that the parser ought to handle the old style of doing it without the ::, we could work at it. But it is a lot simpler to just require it. Let me know what you think.

@wsmorgan
Copy link
Collaborator Author

Making the :: a requirement isn't a big deal, I'll just need to update our older code a bit.

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