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

logic type #41

Merged
merged 2 commits into from Feb 2, 2023
Merged

Conversation

usernaimandrey
Copy link
Contributor

No description provided.

theory: |
Начиная с 11 стандарта в С++ был добавлен новый для этого языка тип по имени `bool`. Он назван в честь английского математика Джорджа Буля, разработавшего математическое представление законов логики.

Булевская переменная может принимать два значения: `true` (истина) или `false` (лож). Для хранения булевской переменной выделяется один байт:
Copy link
Contributor

Choose a reason for hiding this comment

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

Мягкий знак в слове "ложь" потерялся


В ранних версиях языка С++ булевский тип отсутствовал. В место этого С++ интерпретировал ненулевые значения как `true`, а нулевые как `false`.

Литералы `true` и `false` могут быть преобразованы в тип `int`, причем истинна будет преобразована в единицу, а лож в ноль:
Copy link
Contributor

Choose a reason for hiding this comment

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

И тут тоже

@fey
Copy link
Contributor

fey commented Feb 2, 2023

@usernaimandrey Можешь использовать https://languagetool.org/ для проверки на опечатки.

@usernaimandrey
Copy link
Contributor Author

@usernaimandrey Можешь использовать https://languagetool.org/ для проверки на опечатки.

так вот я на него понадеялся а он не интерпретирует это как ошибку)

@emp7yhead emp7yhead merged commit 090130f into hexlet-basics:main Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants