Skip to content

Fix typos in const page #203

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

Merged
merged 1 commit into from
Nov 9, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Language/Variables/Variable Scope & Qualifiers/const.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ subCategories: [ "Variable Scope & Qualifiers" ]
=== Description
The `const` keyword stands for constant. It is a variable _qualifier_ that modifies the behavior of the variable, making a variable "_read-only_". This means that the variable can be used just as any other variable of its type, but its value cannot be changed. You will get a compiler error if you try to assign a value to a `const` variable.

Constants defined with the const keyword obey the rules of link:../scope[variable scoping] that govern other variables. This, and the pitfalls of using#define, makes the const keyword a superior method for defining constants and is preferred over using link:../../../structure/further-syntax/define[#define].
Constants defined with the `const` keyword obey the rules of link:../scope[variable scoping] that govern other variables. This, and the pitfalls of using `#define`, makes the `const` keyword a superior method for defining constants and is preferred over using link:../../../structure/further-syntax/define[`#define`].
[%hardbreaks]

--
Expand All @@ -45,7 +45,7 @@ float x;

// ....

x = pi * 2; // it's fine to use const's in math
x = pi * 2; // it's fine to use consts in math

pi = 7; // illegal - you can't write to (modify) a constant

Expand Down