Browse Source

upd docs import

221V 3 months ago
parent
commit
25cb129144
1 changed files with 9 additions and 17 deletions
  1. 9 17
      docs/readme.md

+ 9 - 17
docs/readme.md

@@ -234,23 +234,6 @@ todo more examples -- with switch case dlang
 
 
 ## 2.5 aliases for imports, externs etc
 ## 2.5 aliases for imports, externs etc
 ```
 ```
-// definition at the beginning of the file
-use as use_std
-    std [ stdio array string algorithm ]
-
-
-// allows use elsewhere in the file -- generate next code in this position in the target .d file
-use use_std
-
-->
-
-import std.stdio;
-import std.array;
-import std.string;
-import std.algorithm;
-```
-
-```
 use core.stdc.stdio [ printf scanf ]
 use core.stdc.stdio [ printf scanf ]
     std.conv [ to ]
     std.conv [ to ]
 
 
@@ -261,9 +244,14 @@ import std.conv : to;
 ```
 ```
 
 
 ```
 ```
+// definition at the beginning of the file
 use as use1
 use as use1
     core.stdc.stdio [ printf scanf ]
     core.stdc.stdio [ printf scanf ]
     std.conv [ to ]
     std.conv [ to ]
+    std.stdio
+    std.array
+    std.string
+    std.algorithm
 
 
 
 
 use1 // use elsewhere in the file
 use1 // use elsewhere in the file
@@ -271,6 +259,10 @@ use1 // use elsewhere in the file
 ->
 ->
 import core.stdc.stdio : printf, scanf;
 import core.stdc.stdio : printf, scanf;
 import std.conv : to;
 import std.conv : to;
+import std.stdio;
+import std.array;
+import std.string;
+import std.algorithm;
 ```
 ```
 todo add more examples
 todo add more examples