File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -429,12 +429,22 @@ $(H3 $(LNAME2 export, $(D export) Attribute))
429
429
or DLL.)
430
430
431
431
$(P $(D export) applied to the definition of a symbol will export it. $(D export) applied to
432
- a declaration of a symbol will import it.)
432
+ a declaration of a symbol will import it.
433
+ A variable is a definition unless `extern` is applied to it.)
433
434
434
435
---
435
436
export int x = 3; // definition, exporting `x`
436
437
export int y; // definition, exporting `y`
437
438
export extern int z; // declaration, importing `z`
439
+
440
+ export __gshared h = 3; // definition, exporting `h`
441
+ export __gshared i; // definition, exporting `i`
442
+ export extern __gshared int j; // declaration, importing `j`
443
+ ---
444
+
445
+ $(P A function with a body is a definition, without a body is a declaration.)
446
+
447
+ ---
438
448
export void f() { } // definition, exporting `f`
439
449
export void g(); // declaration, importing `g`
440
450
---
You can’t perform that action at this time.
0 commit comments