🎨 style(syntax): normalize naming conventions
Align all TSL syntax documentation examples with docs/tsl/naming.md: - Classes/types: PascalCase, drop Hungarian prefix (THuman→Human) - Parameters/locals: snake_case with meaningful names (isLeft→is_left, maxb→max_b) - Private members: snake_case_ with trailing underscore (real_part_, imaginary_part_) - Public members: PascalCase (value→Value) - Top-level functions: PascalCase (test→Test) - Module constants: kPascalCase (kernel_dll→kKernelDll) Affected: 01-24 syntax docs (23 files) Verified: 150+ code blocks locally tested, output unchanged Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -46,13 +46,13 @@
|
||||
代码块身份:可直接照写示例
|
||||
|
||||
```tsl
|
||||
obj := new TStringList();
|
||||
obj.CommaText := "A=aaa,B=bbb,C=222";
|
||||
writeLn(obj[1]);
|
||||
writeLn(obj["B"]);
|
||||
writeLn(obj.Count);
|
||||
obj.Add("D=444");
|
||||
writeLn(obj.Count);
|
||||
list := new TStringList();
|
||||
list.CommaText := "A=aaa,B=bbb,C=222";
|
||||
writeLn(list[1]);
|
||||
writeLn(list["B"]);
|
||||
writeLn(list.Count);
|
||||
list.Add("D=444");
|
||||
writeLn(list.Count);
|
||||
```
|
||||
|
||||
结果说明:
|
||||
@@ -65,11 +65,11 @@ writeLn(obj.Count);
|
||||
代码块身份:可直接照写示例
|
||||
|
||||
```tsl
|
||||
obj := new THashedStringList();
|
||||
obj.Add("A=aaa");
|
||||
obj.Add("B=bbb");
|
||||
writeLn(obj.Count);
|
||||
writeLn(obj["B"]);
|
||||
list := new THashedStringList();
|
||||
list.Add("A=aaa");
|
||||
list.Add("B=bbb");
|
||||
writeLn(list.Count);
|
||||
writeLn(list["B"]);
|
||||
```
|
||||
|
||||
结果说明:
|
||||
|
||||
Reference in New Issue
Block a user