Skip to content

Commit 38c8a03

Browse files
committed
fix #28277, replace type with struct in docs
[ci skip]
1 parent 2cb04e0 commit 38c8a03

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

doc/src/manual/calling-c-and-fortran-code.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ end
734734
```
735735

736736
The meaning of prefix `&` is not quite the same as in C. In particular, any changes to the referenced
737-
variables will not be visible in Julia unless the type is mutable (declared via `type`). However,
737+
variables will not be visible in Julia unless the type is mutable (declared via `mutable struct`). However,
738738
even for immutable structs it will not cause any harm for called functions to attempt such modifications
739739
(that is, writing through the passed pointers). Moreover, `&` may be used with any expression,
740740
such as `&0` or `&f(x)`.

doc/src/manual/constructors.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ julia> Point(x::T, y::T) where {T<:Real} = Point{T}(x,y);
338338

339339
Notice that each definition looks like the form of constructor call that it handles.
340340
The call `Point{Int64}(1,2)` will invoke the definition `Point{T}(x,y)` inside the
341-
`type` block.
341+
`struct` block.
342342
The outer constructor declaration, on the other hand, defines a
343343
method for the general `Point` constructor which only applies to pairs of values of the same real
344344
type. This declaration makes constructor calls without explicit type parameters, like `Point(1,2)`
@@ -534,7 +534,7 @@ The problem is that we want `S` to be a larger type than `T`, so that we can sum
534534
with less information loss. For example, when `T` is [`Int32`](@ref), we would like `S` to
535535
be [`Int64`](@ref). Therefore we want to avoid an interface that allows the user to construct
536536
instances of the type `SummedArray{Int32,Int32}`. One way to do this is to provide a
537-
constructor only for `SummedArray`, but inside the `type` definition block to suppress
537+
constructor only for `SummedArray`, but inside the `struct` definition block to suppress
538538
generation of default constructors:
539539

540540
```jldoctest

doc/src/manual/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ Main Module
575575
gvar_self 13 bytes String
576576
```
577577

578-
This does not apply to `function` or `type` declarations. However, anonymous functions bound to global
578+
This does not apply to `function` or `struct` declarations. However, anonymous functions bound to global
579579
variables are serialized as can be seen below.
580580

581581
```julia-repl

doc/src/manual/noteworthy-differences.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ may trip up Julia users accustomed to MATLAB:
6969
* In both Julia and MATLAB, the variable `ans` is set to the value of the last expression issued
7070
in an interactive session. In Julia, unlike MATLAB, `ans` is not set when Julia code is run in
7171
non-interactive mode.
72-
* Julia's `type`s do not support dynamically adding fields at runtime, unlike MATLAB's `class`es.
72+
* Julia's `struct`s do not support dynamically adding fields at runtime, unlike MATLAB's `class`es.
7373
Instead, use a [`Dict`](@ref).
7474
* In Julia each module has its own global scope/namespace, whereas in MATLAB there is just one global
7575
scope.

0 commit comments

Comments
 (0)