Skip to content

Chapters 2 and 3 grammar reformatting#167

Open
d0ctorzer0 wants to merge 5 commits intoStrataSource:as-guidefrom
d0ctorzer0:as-guide
Open

Chapters 2 and 3 grammar reformatting#167
d0ctorzer0 wants to merge 5 commits intoStrataSource:as-guidefrom
d0ctorzer0:as-guide

Conversation

@d0ctorzer0
Copy link
Copy Markdown
Member

Reformatted and updated grammar in Chapters 2 and 3 to be more concise. Fixed minor typo in Chapter 1.

d0ctorzer0 and others added 5 commits March 19, 2026 12:57
Changed a few misspellings and edited the grammar to make the flow more natural.
Fixed the broken link. Also edited one more sentence to align with the rest of the doc.
Minor grammatical changes to chapters 2 and 3. Fixed one minor typo in Chapter 1.
Copy link
Copy Markdown
Contributor

@OrsellGit OrsellGit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some smallish changes that need to be done but everything else is very good!

- [Integer size reference table](#integer-size-reference-table).

> Unfortunately, in this chapter you won't learn anything really interesting, but this knowledge is crucial to continue further. Data types in general are a very extensive subject, but you don't need to know everything. This chapter is supposed to teach you how to handle value types in your script.
> The knowledge in this chapter is crucial to continue further. Data types are an extensive subject, but you don't need to know everything. This chapter's goal is to teach you how to handle value types in your script.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The knowledge in this chapter is crucial to continue further. Data types are an extensive subject, but you don't need to know everything.

This can be dumbed down to just, something like "most of this content is optional but some might be helpful so feel free to read"

> This chapter won't cover every detail about any of data types, it is recommended you visit the [Data Types Section](../game/type) of the wiki for more information.
> Alternatively, you can find references on the [AS Official Documentation](https://www.angelcode.com/angelscript/sdk/docs/manual/doc_datatypes.html), however please note that Strata's wiki will be the most representative, some functionality might have been changed!
> This chapter won't cover every detail of every data type. It is recommended you visit the [Data Types Section](../game/type) of the Wiki for more information.
> Alternatively, you can find references on the [AS Official Documentation](https://www.angelcode.com/angelscript/sdk/docs/manual/doc_datatypes.html). Please note, however, that the Strata Wiki is a better reference, as some functionality may have been changed.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"however, that" can be removed.

Once declared, variables cannot change their type without redeclaration. This is not allowed:
Once declared, variables cannot change their type without redeclaration. This, for example, is not allowed:
```cpp
int myInt;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these two lines can be combined

```

The `auto` keyword is not recommended for several cases. The main one of them is that you cannot immediately see the data type of a returned object especially from functions, like the one above. We don't know what that function will return. Another reason is that sometimes the compiler might guess wrong, especially in cases like integers, where you have multiple ways that `1` could have been described (e.g. int8/int16, both can describe `1`, even `bool` can).
The `auto` keyword is not recommended in many cases. Using `auto`, you cannot immediately see the data type of a returned object, especially from functions such the one above. We don't know what that function will return. Additionally, there is always a chance the compiler may guess incorrectly. This issue is especially prominent in cases such as integers, where there are multiple ways `1` could be described (e.g. int8/int16, both can describe `1`, as can `bool`).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using auto

Instead, do "When using auto".

- NOT - denoted as `!`. Evaluates to true if value is false and vice versa.
- AND - denoted as `&&`. Evaluates to true if both values are true.
- OR - denoted as `||`. Evaluates to true, if even one only of the values is true. Otherwise evaluates to false if both values are false.
- XOR - denoted as `^^`. Evaluates to True if and only if **one** of the values is True.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True is capitalized here when it shouldn't

}
```
In this case my_number doesn't exist inside *my_func2*, it only exists inside *my_func1* and only for the duration of that function's execution.
In this case, `my_number` doesn't exist inside *my_func2*, it only exists inside *my_func1* and only for the duration of that function's execution.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

match the ticks used with my_number to replace the * with my_func2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants