Skip to content

Commit 77e75e4

Browse files
authored
Merge pull request #672 from animeshsrivastava24/patch-2
Code Highlight markup and Link colouration fix const.adoc
2 parents e4ed3dc + ca3e7e1 commit 77e75e4

File tree

1 file changed

+3
-3
lines changed
  • Language/Variables/Variable Scope & Qualifiers

1 file changed

+3
-3
lines changed

Language/Variables/Variable Scope & Qualifiers/const.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ subCategories: [ "Variable Scope & Qualifiers" ]
1919
=== Description
2020
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.
2121

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

2525
--
@@ -49,9 +49,9 @@ pi = 7; // illegal - you can't write to (modify) a constant
4949

5050
[float]
5151
=== Notes and Warnings
52-
*`#define` or `const`*
52+
*link:../../../structure/further-syntax/define[`#define`] or `const`*
5353

54-
You can use either `const` or `#define` for creating numeric or string constants. For link:../../data-types/array[arrays], you will need to use `const`. In general `const` is preferred over `#define` for defining constants.
54+
You can use either `const` or link:../../../structure/further-syntax/define[`#define`] for creating numeric or string constants. For link:../../data-types/array[arrays], you will need to use `const`. In general `const` is preferred over link:../../../structure/further-syntax/define[`#define`] for defining constants.
5555

5656

5757
--

0 commit comments

Comments
 (0)