Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
June 22, 2004 Would like an example of using the "package" attr | ||||
---|---|---|---|---|
| ||||
I've been looking around wiki and here, but I can't seem to find an example of how to use the new "package" attribute that's in the current "D" v0.92 build. Could someone please explain how and when it's used, and maybe even write some "D" code to show it in use. It would be very helpful. Thxs in advance! ;) ------------------------------------------------------------------- "Dare to reach for the Stars...Dare to Dream, Build, and Achieve!" |
June 22, 2004 Re: Would like an example of package | ||||
---|---|---|---|---|
| ||||
Posted in reply to David L. Davis | In article <cb8424$5q9$1@digitaldaemon.com>, David L. Davis says... > >I've been looking around wiki and here, but I can't seem to find an example of how to use the new "package" attribute that's in the current "D" v0.92 build. Could someone please explain how and when it's used, and maybe even write some "D" code to show it in use. It would be very helpful. --- In file1 ---- > package int f() > { > // body > } --- In file2 --- > import file1; > > int n = f(); The "package" constraint means that f() is not callable unless file1 and file2 are in the same dirctory. Arcane Jill |
June 22, 2004 Re: Would like an example of package | ||||
---|---|---|---|---|
| ||||
Posted in reply to Arcane Jill | In article <cb95n0$1oem$1@digitaldaemon.com>, Arcane Jill says... > >In article <cb8424$5q9$1@digitaldaemon.com>, David L. Davis says... >> >>I've been looking around wiki and here, but I can't seem to find an example of how to use the new "package" attribute that's in the current "D" v0.92 build. Could someone please explain how and when it's used, and maybe even write some "D" code to show it in use. It would be very helpful. > >--- In file1 ---- > >> package int f() >> { >> // body >> } > >--- In file2 --- > >> import file1; >> >> int n = f(); > >The "package" constraint means that f() is not callable unless file1 and file2 are in the same dirctory. > >Arcane Jill > > Arcane Jill: Thxs! :) ------------------------------------------------------------------- "Dare to reach for the Stars...Dare to Dream, Build, and Achieve!" |
Copyright © 1999-2021 by the D Language Foundation