GoTo¶
Branches to a statement label, a statement node.
声明¶
语法¶
GoTo(int target_id, identifier name)
参数¶
target_id
contains int
IDs to link GoTo
with GoToTarget.
name
contains the identifier name.
返回值¶
无。
描述¶
GoTo statement points to a GoToTarget with the corresponding target_id
within the same procedure. We currently use int
IDs to link GoTo with
GoToTarget to avoid issues with serialization.
类型¶
Integer or target_id
and a valid identifier name.
示例¶
program goto
implicit none
integer :: a
a = 5
go to 1
1 print *, a
end program
ASR:
(TranslationUnit
[(Program
goto_01
()
[]
[(ImplicitNone
[]
()
)]
[(Declaration
(AttrType
TypeInteger
[]
()
None
)
[]
[(a
[]
[]
()
None
())]
()
)]
[(=
0
a
5
()
)
(GoTo
0
()
1
[]
()
)
(Print
1
()
[a]
()
)]
[]
)]
)