mirror of
https://github.com/vlang/v.git
synced 2025-09-11 08:25:42 -04:00
doc: fix typos (#24693)
This commit is contained in:
parent
f2506368ac
commit
a9e9e05118
@ -1612,7 +1612,7 @@ So in `abc/def/source.v` the first line will be `module def`, and not `module ab
|
|||||||
`import module_name` statements must respect file hierarchy, you cannot `import def`, only
|
`import module_name` statements must respect file hierarchy, you cannot `import def`, only
|
||||||
`abc.def`
|
`abc.def`
|
||||||
|
|
||||||
Refering to a module symbol such as a function or const, only needs module name as prefix:
|
Referring to a module symbol such as a function or const, only needs module name as prefix:
|
||||||
|
|
||||||
```v ignore
|
```v ignore
|
||||||
module def
|
module def
|
||||||
@ -7373,7 +7373,7 @@ import sync
|
|||||||
__global (
|
__global (
|
||||||
sem sync.Semaphore // needs initialization in `init()`
|
sem sync.Semaphore // needs initialization in `init()`
|
||||||
mtx sync.RwMutex // needs initialization in `init()`
|
mtx sync.RwMutex // needs initialization in `init()`
|
||||||
f1 = f64(34.0625) // explicily initialized
|
f1 = f64(34.0625) // explicitly initialized
|
||||||
shmap shared map[string]f64 // initialized as empty `shared` map
|
shmap shared map[string]f64 // initialized as empty `shared` map
|
||||||
f2 f64 // initialized to `0.0`
|
f2 f64 // initialized to `0.0`
|
||||||
)
|
)
|
||||||
@ -7636,7 +7636,7 @@ Hello world, value: 12345
|
|||||||
#0 10:42:33 /v/examples>
|
#0 10:42:33 /v/examples>
|
||||||
```
|
```
|
||||||
|
|
||||||
Note, that the C function redeclarations look very simillar to the V ones, with some differences:
|
Note, that the C function redeclarations look very similar to the V ones, with some differences:
|
||||||
1) They lack a body (they are defined on the C side) .
|
1) They lack a body (they are defined on the C side) .
|
||||||
2) Their names start with `C.` .
|
2) Their names start with `C.` .
|
||||||
3) Their names can have capital letters (unlike V ones, that are required to use snake_case) .
|
3) Their names can have capital letters (unlike V ones, that are required to use snake_case) .
|
||||||
|
Loading…
x
Reference in New Issue
Block a user