Skip to content

Commit 5b36569

Browse files
authored
修改用词
declare改为define,sentence改为statement
1 parent 7b1ba9d commit 5b36569

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

docs/en/overview.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ nav:
88

99
# MCFPP Overview
1010

11-
Before the start: sentences of mcfpp is end up with semicolon.
11+
Before the start: statements of mcfpp is end up with semicolon.
1212

1313
## Project information file in JSON format<Badge type="tip">WIP</Badge>
1414

@@ -43,7 +43,7 @@ Project information file is situated on root of engineering catalogue, As an ent
4343

4444
### Variables
4545

46-
Declare : `type identifier (= expr)?;`
46+
Defination : `type identifier (= expr)?;`
4747

4848
Such as : `int i = 5 + p;``int x,y,z;`
4949

@@ -76,11 +76,11 @@ During Compiling, If any variable has been defined as literal, like `int i = 5;`
7676

7777
- const
7878

79-
`const` means a variable is always constant. That is, its value is given during compilation, and never changes. Such as `const int i = 5;`, `i` will be seem as constant during compiling. Constant is always static during compiling, and its value must be clear when we declare it, can't assign after declaring.
79+
`const` means a variable is always constant. That is, its value is given during compilation, and never changes. Such as `const int i = 5;`, `i` will be seem as constant during compiling. Constant is always static during compiling, and its value must be clear when we define it, can't assign after declaring.
8080

8181
- import <Badge type="warning">Deprecated</Badge>
8282

83-
`import` means a variable is import variable, it's value is imported from other place. Such as `import int i;`, `i` will be seen as import variable after compile. Often, variable only can be used after assignment, but if we use `import` modifier, Then variable can be used after declaration without assignment.
83+
`import` means a variable is import variable, it's value is imported from other place. Such as `import int i;`, `i` will be seen as import variable after compile. Often, variable only can be used after assignment, but if we use `import` modifier, Then variable can be used after defination without assignment.
8484

8585
### Comment
8686

@@ -134,13 +134,13 @@ for(forinit;bool;forupdate){
134134

135135
## Namespace
136136

137-
Each file's namespace can be declared independently
137+
Each file's namespace can be defined independently
138138

139139
```cpp
140140
namespace xxx;
141141
```
142142

143-
If the file haven't declared a separate namespace, the namespace defaults to the namespace set in the project configuration file.
143+
If the file haven't define a separate namespace, the namespace defaults to the namespace set in the project configuration file.
144144

145145
## Function
146146

@@ -156,7 +156,7 @@ func test(int i) -> int{
156156
157157
```
158158

159-
Function's namespace is decided by the file's namespace. If the file haven't declared a separate namespace, the namespace defaults to the namespace set in the project configuration file.
159+
Function's namespace is decided by the file's namespace. If the file haven't defined a separate namespace, the namespace defaults to the namespace set in the project configuration file.
160160

161161
:::tip Tip
162162
In mcfpp, function name can contains most utf-8 characters, but the compiled mcfunction's name will only contains characters, underline and numbers. The illegal characters will be replaced by `_uxxxx`.
@@ -291,15 +291,15 @@ class Student{
291291

292292
### Abstract
293293

294-
Add `abstract` keyword before class can declare the class as abstract class. Abstract function can't be instantiate.
294+
Add `abstract` keyword before class can define the class as abstract class. Abstract function can't be instantiate.
295295

296-
Add `abstract` keyword before function can declare the function as abstract function. Abstract function can't include function body.
296+
Add `abstract` keyword before function can define the function as abstract function. Abstract function can't include function body.
297297

298298
### Extension Function
299299

300-
Extension Function makes you can "add" function to current types. And don't need to create new derived type, recompile or change original data type by other methods. Extension function declares out of the class, but it also can be called, as other functions in the class.
300+
Extension Function makes you can "add" function to current types. And don't need to create new derived type, recompile or change original data type by other methods. Extension function defined out of the class, but it also can be called, as other functions in the class.
301301

302-
Declares extension function in the form of `Class name.Function name`, for example:
302+
Define extension function in the form of `Class name.Function name`, for example:
303303

304304
```cpp
305305
namespace test;
@@ -341,13 +341,13 @@ interface InterfaceName{
341341
}
342342
```
343343

344-
You can declare abstract function in the interface. Interface can inherit from other interfaces.
344+
You can define abstract function in the interface. Interface can inherit from other interfaces.
345345

346346
## Template <Badge type="tip">WIP</Badge>
347347

348348
Structure is a datatype that totally makes up by score board. So structure only can contain score board, that's `int` type variables as members.
349349

350-
When declaring field, we can ignore type ‘int'. Except this, structure is almost the same as class.
350+
During the defination of field, we can ignore type ‘int'. Except this, structure is almost the same as class.
351351

352352
Here's an example of structure:
353353

@@ -387,9 +387,9 @@ MNI is similar with the JNI in Java, is a kind of programming framework, makes t
387387

388388
### native function
389389

390-
native can be declared in classes or functions, Used to run a specific Java function when **compiling**.
390+
native can be defined in classes or functions, Used to run a specific Java function when **compiling**.
391391

392-
It's declaration is like this:
392+
It's defination is like this:
393393

394394
```cpp
395395
func test(params...) -> returnType = packagename.classname.funcname;

0 commit comments

Comments
 (0)