@@ -344,7 +344,7 @@ The following function template uses different specifiers with this syntax of th
344
344
---
345
345
void myFunction(T)(T parameter) {
346
346
static if (is (T LocalAlias == struct)) {
347
- writefln("\n --- struct - --");
347
+ writefln("\n -- struct --");
348
348
// LocalAlias is the same as T. ' parameter' is the
349
349
// struct object that has been passed to this
350
350
// function.
@@ -355,7 +355,7 @@ void myFunction(T)(T parameter) {
355
355
}
356
356
357
357
static if (is (T baseTypes == super)) {
358
- writeln("\n --- super - --");
358
+ writeln("\n -- super --");
359
359
// The ' baseTypes' tuple contains all of the base
360
360
// types of T. ' parameter' is the class variable that
361
361
// has been passed to this function.
@@ -368,7 +368,7 @@ void myFunction(T)(T parameter) {
368
368
}
369
369
370
370
static if (is (T ImplT == enum)) {
371
- writeln("\n --- enum - --");
371
+ writeln("\n -- enum --");
372
372
// ' ImplT' is the actual implementation type of this
373
373
// enum type. ' parameter' is the enum value that has
374
374
// been passed to this function.
@@ -378,7 +378,7 @@ void myFunction(T)(T parameter) {
378
378
}
379
379
380
380
static if (is (T ReturnT == return)) {
381
- writeln("\n --- return - --");
381
+ writeln("\n -- return --");
382
382
// ' ReturnT' is the return type of the function
383
383
// pointer that has been passed to this function.
384
384
@@ -418,18 +418,18 @@ The output:
418
418
)
419
419
420
420
$(SHELL_SMALL
421
- -- - struct - --
421
+ -- struct --
422
422
Constructing a new Point object by copying it.
423
423
424
- -- - super - --
424
+ -- super --
425
425
class AlarmClock has 2 base types.
426
426
All of the bases: (Object, Clock)
427
427
The topmost base: Object
428
428
429
- --- enum - --
429
+ -- enum --
430
430
The implementation type of enum WeekDays is int
431
431
432
- --- return - --
432
+ -- return --
433
433
This is a function with a return type of char:
434
434
char function(double d, int i, Clock c)
435
435
calling it... and the result is 'a'
@@ -497,7 +497,7 @@ The following program tests that $(C is) expression with four different types:
497
497
import std.stdio ;
498
498
499
499
void myFunction (T)(T parameter) {
500
- writefln(" \n --- Called with %s - --" , T.stringof);
500
+ writefln(" \n -- Called with %s --" , T.stringof);
501
501
502
502
static if (is (T == Value[Key],
503
503
Value,
@@ -533,20 +533,20 @@ The condition is satisfied only if the key type is $(C string):
533
533
)
534
534
535
535
$(SHELL_SMALL
536
- -- - Called with int - --
536
+ -- Called with int --
537
537
No, the condition has not been satisfied.
538
538
539
- -- - Called with int [string ] - --
539
+ -- Called with int [string ] --
540
540
Yes, the condition has been satisfied.
541
541
The value type: int
542
542
The key type : string
543
543
544
- -- - Called with double [string ] - --
544
+ -- Called with double [string ] --
545
545
Yes, the condition has been satisfied.
546
546
The value type: double
547
547
The key type : string
548
548
549
- -- - Called with dchar [long ] - --
549
+ -- Called with dchar [long ] --
550
550
No, the condition has not been satisfied.
551
551
)
552
552
0 commit comments