Issue 23 in f2py: Bugs in If class? Related to Isssue21.

2 views
Skip to first unread message

f2...@googlecode.com

unread,
May 14, 2010, 12:13:58 AM5/14/10
to f2py-...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 23 by TakaoKotani: Bugs in If class? Related to Isssue21.
http://code.google.com/p/f2py/issues/detail?id=23

I have two points. I have simplified problems.

(1) For a program,
-----------------------------------
subroutine bndfp(ax,i)
logical:: ax
if(ax) i=1
end
-----------------------------------
Your parse in api.py classify 'if(ax)i' as a variable.
---------------------------------------------------
Subroutine
args=['ax', 'i']
item=Line('subroutine bndfp(ax,i)',(2, 2),None,None,<reader>)
a=AttributeHolder:
variables=<dict with keys ['i', 'ax']>
content:
Logical
selector=('', '')
entity_decls=['ax']
item=Line('logical:: ax',(3, 3),None,None,<reader>)
Assignment
variable='if(ax)i'
sign='='
expr='1'
item=Line('if(ax) i=1',(4, 4),None,None,<reader>)
EndSubroutine
blocktype='subroutine'
name='bndfp'
item=Line('end',(5, 5),None,None,<reader>)
---------------------------------------------------


(2) For a program,
-----------------------------------
subroutine bndfp(ax,i)
logical:: ax
if(ax) call bb()
end
-----------------------------------
Your parse in api.py shows
-----------------------------------
If
blocktype='if'
name='__IF__'
item=Line('if(ax) call bb()',(3, 3),None,None,<reader>)
content:
Call
item=Line('call bb()',(3, 3),None,None,<reader>)
-----------------------------------
. This is a little problematic because 'call bb()'
is contained in both of Line. I think 'call bb()' should
not be contained in the If instance.
(it is the same as if then block...).

takao



Reply all
Reply to author
Forward
0 new messages