Package explain
Jarrett Billingsley
kb3ctd2 at yahoo.com
Thu Aug 21 07:51:26 PDT 2008
"Zarathustra" <adam.chrapkowski at gmail.com> wrote in message
news:g8jdfc$cqk$1 at digitalmars.com...
> Could anybody explain what "package" exctly mean?
>
> module package1.module1;
> static int variable = 3;
"static" does not make variables private as in C. "private" does that.
Declarations are implicitly public, hence why you can access it in main.
> module package1.module2;
>
> module package1.module3;
> package import package1.module1, package1.module2;
Yeah, what the hell is "package import"?
> module main;
> import package1.module3;
>
> void main(){
> variable1 = 5; // Why variable is accessable?
> }
>
> |
> |--- main
> |--- package1
> |
> |--- module1
> |--- module2
> |--- module3
>
> I'm dsss user.
More information about the Digitalmars-d-learn
mailing list