@SysInclude { fontdefs } @SysInclude { langdefs } @SysInclude { dl } @SysInclude { docf } export @Foo @Bar def @Base @Begin # This symbol is our guinea pig. def @Foo { This is a basic FOO. } # Demonstrates the lexical scoping. def @Bar { "@Foo" is address@hidden''. } # YOU CAN'T! It's an error: symbol ... previously defined at ... # def @Foo { No way! } @End @Base extend @Base export @Foo @BaseFoo @Before @After def @Derived @Begin # We still see the @Foo from @Base here. def @Before { "@Foo" was address@hidden''. } # Make old @Foo still available through renaming. # Also, you can use @Open for explicit qualification (see below). def @BaseFoo { @Foo } # YOU CAN! Redefining. def @Foo { This is a redefined FOO. } # Here @Foo is the redefined one. def @After { "@Foo" is now address@hidden''. } @End @Derived @Use { @DocumentLayout @OddLeftMargin { 2.5c @OrIfPlain 0f } } @Use { @OrdinaryLayout } @Use { @Base } @Use { @Derived } @Document // @Text @Begin @LP Explicit qualification: @Base @Open { @Foo } @LP Basic one renamed in "@Derived": @BaseFoo @LP Before redefinition: @Before @LP Redefined: @Foo @LP After redefinition: @After @LP Despite redefinition: @Bar @End @Text