Skip to content

Commit 3bb7518

Browse files
authored
Fix markdown bullet list in variables-and-scoping.md (#58771)
1 parent 422d05d commit 3bb7518

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

doc/src/manual/variables-and-scoping.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -733,21 +733,24 @@ object (such as an array), and that object may still be modified. Additionally w
733733
to assign a value to a variable that is declared constant the following scenarios are possible:
734734

735735
* Attempting to replace a constant without the const `keyword` is disallowed:
736-
```jldoctest
737-
julia> const x = 1.0
738-
1.0
739736

740-
julia> x = 1
741-
ERROR: invalid assignment to constant x. This redefinition may be permitted using the `const` keyword.
742-
```
743-
* All other defefinitions of constants are permitted, but may cause significant re-compilation:
744-
```jldoctest
745-
julia> const y = 1.0
746-
1.0
737+
```jldoctest
738+
julia> const x = 1.0
739+
1.0
747740
748-
julia> const y = 2.0
749-
2.0
750-
```
741+
julia> x = 1
742+
ERROR: invalid assignment to constant x. This redefinition may be permitted using the `const` keyword.
743+
```
744+
745+
* All other definitions of constants are permitted, but may cause significant re-compilation:
746+
747+
```jldoctest
748+
julia> const y = 1.0
749+
1.0
750+
751+
julia> const y = 2.0
752+
2.0
753+
```
751754

752755
!!! compat "Julia 1.12"
753756
Prior to julia 1.12, redefinition of constants was poorly supported. It was restricted to

0 commit comments

Comments
 (0)