Skip to content
This repository was archived by the owner on Sep 6, 2024. It is now read-only.

Commit ba3bceb

Browse files
committed
fixes
1 parent 96d3217 commit ba3bceb

File tree

4 files changed

+21
-21
lines changed

4 files changed

+21
-21
lines changed

book/tutor/fields.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ Fields are variables that are declared directly within a class or structure. The
1414

1515
```vein
1616
class Person {
17-
var name: string;
18-
var age: i32;
17+
name: string;
18+
age: i32;
1919
2020
new(name: string, age: i32) {
2121
this.name = name;
@@ -28,9 +28,9 @@ class Person {
2828

2929
```vein
3030
class Car {
31-
var make: string;
32-
var model: string;
33-
var year: i32;
31+
make: string;
32+
model: string;
33+
year: i32;
3434
3535
new(make: string, model: string, year: i32) {
3636
this.make = make;

book/tutor/methods.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ class MyClass {
2828

2929
```vein
3030
class Person {
31-
var name: string;
32-
var age: i32;
31+
name: string;
32+
age: i32;
3333
3434
new(name: string, age: i32) {
3535
this.name = name;
@@ -92,8 +92,8 @@ class MyClass {
9292

9393
```vein
9494
class Product {
95-
var name: string;
96-
var price: f64;
95+
name: string;
96+
price: f64;
9797
9898
new() {
9999
this.name = "Unnamed";
@@ -159,8 +159,8 @@ public operator ==(lhs: FooBarClass, rhs: FooBarClass): bool {
159159

160160
```vein
161161
class Point {
162-
var x: i32;
163-
var y: i32;
162+
x: i32;
163+
y: i32;
164164
165165
new(x: i32, y: i32) {
166166
this.x = x;
@@ -213,11 +213,11 @@ Access modifiers control the visibility and accessibility of classes, methods, a
213213
#use "native("libname.dll", "method_name")"
214214
215215
class Example {
216-
public var publicField: i32;
217-
protected var protectedField: i32;
218-
private var privateField: i32;
216+
public publicField: i32;
217+
protected protectedField: i32;
218+
private privateField: i32;
219219
220-
static var staticField: i32;
220+
static staticField: i32;
221221
222222
public new() {
223223
this.publicField = 1;

book/tutor/strings.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ The `string.startsWith` method checks if a string starts with a specified prefix
3535

3636
```vein
3737
auto str = "Hello, World!";
38-
var result = string.startsWith(str, "Hello");
38+
result = string.startsWith(str, "Hello");
3939
Out.println(result); // Output: true
4040
```
4141

@@ -45,7 +45,7 @@ The `string.endsWith` method checks if a string ends with a specified suffix:
4545

4646
```vein
4747
auto str = "Hello, World!";
48-
var result = string.endsWith(str, "World!");
48+
result = string.endsWith(str, "World!");
4949
Out.println(result); // Output: true
5050
```
5151

@@ -55,7 +55,7 @@ The `string.contains` method checks if a string contains a specified substring:
5555

5656
```vein
5757
auto str = "Hello, World!";
58-
var result = string.contains(str, "World");
58+
result = string.contains(str, "World");
5959
Out.println(result); // Output: true
6060
```
6161

@@ -66,7 +66,7 @@ The `string.equal` method checks if two strings are equal:
6666
```vein
6767
auto str1 = "Hello";
6868
auto str2 = "Hello";
69-
var result = string.equal(str1, str2);
69+
result = string.equal(str1, str2);
7070
Out.println(result); // Output: true
7171
```
7272

book/tutor/type-aliases.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ alias typeAlias <| Int32;
2222
alias Age <| Int32;
2323
2424
class Person {
25-
var age: Age;
25+
age: Age;
2626
2727
new(age: Age) {
2828
this.age = age;
@@ -49,7 +49,7 @@ global alias typeAlias <| Int32;
4949
global alias Age <| Int32;
5050
5151
class Person {
52-
var age: Age;
52+
age: Age;
5353
5454
new(age: Age) {
5555
this.age = age;

0 commit comments

Comments
 (0)