Skip to content

Commit 645b76e

Browse files
committed
Strip trailing space; Add links for module initializers and unittests
1 parent da65f25 commit 645b76e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

spec/function.dd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2954,8 +2954,8 @@ $(H3 $(LNAME2 anonymous, Anonymous Functions and Anonymous Delegates))
29542954
$(H2 $(LNAME2 main, $(D main()) Function))
29552955

29562956
$(P For console programs, $(D main()) serves as the entry point.
2957-
It gets called after all the module initializers are run, and
2958-
after any unittests are run.
2957+
It gets called after all the $(DDSUBLINK spec/module, staticorder, module initializers)
2958+
are run, and after any $(DDLINK spec/unittest, Unit Tests, unittests) are run.
29592959
After it returns, all the module destructors are run.
29602960
$(D main()) must be declared as follows:
29612961
)
@@ -2974,16 +2974,16 @@ $(H2 $(LNAME2 main, $(D main()) Function))
29742974

29752975
$(UL
29762976
$(LI If `main` returns `void`, the OS will receive a zero value on success.)
2977-
$(LI If `main` returns `void` or `noreturn`, the OS will receive a non-zero
2977+
$(LI If `main` returns `void` or `noreturn`, the OS will receive a non-zero
29782978
value on abnormal termination, such as an uncaught exception.)
29792979
$(LI If `main` is declared as `auto`, the inferred return type must be
29802980
one of `void`, `int` and `noreturn`.)
29812981
)
2982-
2982+
29832983
$(P If the $(D string[]) parameter is declared, the parameter will hold any
29842984
arguments passed to the program by the OS. The first argument is typically
29852985
the executable name, followed by any command-line arguments.)
2986-
2986+
29872987
$(P The main function must have D linkage.)
29882988

29892989
$(P Attributes may be added as needed, e.g. `@safe`, `@nogc`, `nothrow`, etc.)

0 commit comments

Comments
 (0)