8000 Macro changes · Issue #36 · aradi/fypp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Macro changes #36
Open
Open
@luflarois

Description

@luflarois

I have a code:

#:if defined("SINGLE_PRECISION")
#:def MACRO(A) 
   call bcast_doubles(dminfo,size($A$),$A$)
#:enddef MACRO
#:else
#:def MACRO(A) 
   call bcast_reals(dminfo,size($A$),$A$)
#:enddef MACRO
#:endif

module init

contains

subroutine tst()

   real :: ah2onw(2)
   real :: dminfo

   ah2onw =2.0
   dminfo = 1.0

   MACRO(ah2onw) !!! <<<------ in this line !!!!

end subroutine tst

subroutine bcast_reals(dminfo,n,a)
   real, INTENT(IN) :: dminfo,a(:)
   integer, intent(in) :: n

   print *,'real'

end subroutine bcast_reals

subroutine bcast_doubles(dminfo,n,a)
   real, INTENT(IN) :: dminfo,a(:)
   integer, intent(in) :: n

   PRINT *,'doubles'

end subroutine bcast_doubles

end module init

And my goal is that the FYPP makes the change of "DM_BCAST_MACRO(ah2onw)" by the macro defined at beginning of code. How can I make it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0