Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beginners guide outdated #19

Open
GWRon opened this issue Apr 25, 2019 · 3 comments
Open

Beginners guide outdated #19

GWRon opened this issue Apr 25, 2019 · 3 comments

Comments

@GWRon
Copy link
Contributor

GWRon commented Apr 25, 2019

During a Pull Request Brucey asked to add Then to if-statements.

The (current) Beginners Guide writes this:

When to use Then? You can put it after your If expression. The use of Then, is not required and I think the code is just as easy to read without Then. Like this, If A = 1 Then B = 2 is equal to If A = 1 B = 2. If you take a BlitzMax file and delete all Then, it will run the same. Use Then if you think it helps you read the code. When I use then, then it is to make an ifstatement on one line more readable, like in the example above and in the example below. My advice is, never use then if your if-statement is not on one line.

(source: https://blitzmax.org/docs/en/tutorials/beginners_guide/)

Maybe we should update that part to fit to the way we write the docs/examples.


Right below that quote you will find a attention/notice-box:

BlitzMax doesn't have Boolean variables which only accepts True or False.

This is not true with NG - as NG understands the new type Bool.

@woollybah
Copy link
Member

There is no type Bool in NG.

@GWRon
Copy link
Contributor Author

GWRon commented Apr 25, 2019

So TBool is there just for BCC ... I wasn't sure and just checked the bcc sources and saw some "bool stuff".

Ignore that second part then.

I know, not an as good candidate to report now but: Global Name$[] 'Declear an Array! contains a little typo.

BTW: should we try to make the "Beginners Guide" SuperStrict (as we do with the examples) ?

@woollybah
Copy link
Member

Yes, eventually.

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

No branches or pull requests

2 participants