我想知道当时是否有更明确的声明
if not attached foo then create foo end if attached foo as l_foo then l_foo.bark end
像
if not attached foo then create foo foo.bark else foo.bark end
我会重复这句话 foo.bark
foo.bark
为了避免代码重复和多次测试,可以使用以下代码:
l_foo := foo if not attached l_foo then create l_foo foo := l_foo end l_foo.bark