"Fossies" - the Fresh Open Source Software Archive

Member "julia-1.1.1/share/julia/base/docs/basedocs.jl" (16 May 2019, 45749 Bytes) of package /linux/misc/julia-1.1.1-linux-i686.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Julia source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 # This file is a part of Julia. License is MIT: https://julialang.org/license
    2 
    3 module BaseDocs
    4 
    5 @nospecialize # don't specialize on any arguments of the methods declared herein
    6 
    7 struct Keyword
    8     name::Symbol
    9 end
   10 macro kw_str(text)
   11     return Keyword(Symbol(text))
   12 end
   13 
   14 """
   15 **Welcome to Julia $(string(VERSION)).** The full manual is available at
   16 
   17     https://docs.julialang.org/
   18 
   19 as well as many great tutorials and learning resources:
   20 
   21     https://julialang.org/learning/
   22 
   23 For help on a specific function or macro, type `?` followed
   24 by its name, e.g. `?cos`, or `?@time`, and press enter.
   25 Type `;` to enter shell mode, `]` to enter package mode.
   26 """
   27 kw"help", kw"?", kw"julia", kw""
   28 
   29 """
   30     using
   31 
   32 `using Foo` will load the module or package `Foo` and make its [`export`](@ref)ed names
   33 available for direct use. Names can also be used via dot syntax (e.g. `Foo.foo` to access
   34 the name `foo`), whether they are `export`ed or not.
   35 See the [manual section about modules](@ref modules) for details.
   36 """
   37 kw"using"
   38 
   39 """
   40     import
   41 
   42 `import Foo` will load the module or package `Foo`.
   43 Names from the imported `Foo` module can be accessed with dot syntax
   44 (e.g. `Foo.foo` to access the name `foo`).
   45 See the [manual section about modules](@ref modules) for details.
   46 """
   47 kw"import"
   48 
   49 """
   50     export
   51 
   52 `export` is used within modules to tell Julia which functions should be
   53 made available to the user. For example: `export foo` makes the name
   54 `foo` available when [`using`](@ref) the module.
   55 See the [manual section about modules](@ref modules) for details.
   56 """
   57 kw"export"
   58 
   59 """
   60     abstract type
   61 
   62 `abstract type` declares a type that cannot be instantiated, and serves only as a node in the
   63 type graph, thereby describing sets of related concrete types: those concrete types
   64 which are their descendants. Abstract types form the conceptual hierarchy which makes
   65 Julia’s type system more than just a collection of object implementations. For example:
   66 
   67 ```julia
   68 abstract type Number end
   69 abstract type Real <: Number end
   70 ```
   71 [`Number`](@ref) has no supertype, whereas [`Real`](@ref) is an abstract subtype of `Number`.
   72 """
   73 kw"abstract type"
   74 
   75 """
   76     module
   77 
   78 `module` declares a `Module`, which is a separate global variable workspace. Within a
   79 module, you can control which names from other modules are visible (via importing), and
   80 specify which of your names are intended to be public (via exporting).
   81 Modules allow you to create top-level definitions without worrying about name conflicts
   82 when your code is used together with somebody else’s.
   83 See the [manual section about modules](@ref modules) for more details.
   84 
   85 # Examples
   86 ```julia
   87 module Foo
   88 import Base.show
   89 export MyType, foo
   90 
   91 struct MyType
   92     x
   93 end
   94 
   95 bar(x) = 2x
   96 foo(a::MyType) = bar(a.x) + 1
   97 show(io::IO, a::MyType) = print(io, "MyType \$(a.x)")
   98 end
   99 ```
  100 """
  101 kw"module"
  102 
  103 """
  104     baremodule
  105 
  106 `baremodule` declares a module that does not contain `using Base`
  107 or a definition of `eval`. It does still import `Core`.
  108 """
  109 kw"baremodule"
  110 
  111 """
  112     primitive type
  113 
  114 `primitive type` declares a concrete type whose data consists only of a series of bits. Classic
  115 examples of primitive types are integers and floating-point values. Some example built-in
  116 primitive type declarations:
  117 
  118 ```julia
  119 primitive type Char 32 end
  120 primitive type Bool <: Integer 8 end
  121 ```
  122 The number after the name indicates how many bits of storage the type requires. Currently,
  123 only sizes that are multiples of 8 bits are supported.
  124 The [`Bool`](@ref) declaration shows how a primitive type can be optionally
  125 declared to be a subtype of some supertype.
  126 """
  127 kw"primitive type"
  128 
  129 """
  130     macro
  131 
  132 `macro` defines a method for inserting generated code into a program.
  133 A macro maps a sequence of argument expressions to a returned expression, and the
  134 resulting expression is substituted directly into the program at the point where
  135 the macro is invoked.
  136 Macros are a way to run generated code without calling `eval`, since the generated
  137 code instead simply becomes part of the surrounding program.
  138 Macro arguments may include expressions, literal values, and symbols.
  139 
  140 # Examples
  141 ```jldoctest
  142 julia> macro sayhello(name)
  143            return :( println("Hello, ", \$name, "!") )
  144        end
  145 @sayhello (macro with 1 method)
  146 
  147 julia> @sayhello "Charlie"
  148 Hello, Charlie!
  149 ```
  150 """
  151 kw"macro"
  152 
  153 """
  154     local
  155 
  156 `local` introduces a new local variable.
  157 See the [manual section on variable scoping](@ref scope-of-variables) for more information.
  158 
  159 # Examples
  160 ```jldoctest
  161 julia> function foo(n)
  162            x = 0
  163            for i = 1:n
  164                local x # introduce a loop-local x
  165                x = i
  166            end
  167            x
  168        end
  169 foo (generic function with 1 method)
  170 
  171 julia> foo(10)
  172 0
  173 ```
  174 """
  175 kw"local"
  176 
  177 """
  178     global
  179 
  180 `global x` makes `x` in the current scope and its inner scopes refer to the global
  181 variable of that name.
  182 See the [manual section on variable scoping](@ref scope-of-variables) for more information.
  183 
  184 # Examples
  185 ```jldoctest
  186 julia> z = 3
  187 3
  188 
  189 julia> function foo()
  190            global z = 6 # use the z variable defined outside foo
  191        end
  192 foo (generic function with 1 method)
  193 
  194 julia> foo()
  195 6
  196 
  197 julia> z
  198 6
  199 ```
  200 """
  201 kw"global"
  202 
  203 """
  204     =
  205 
  206 `=` is the assignment operator.
  207 * For variable `a` and expression `b`, `a = b` makes `a` refer to the value of `b`.
  208 * For functions `f(x)`, `f(x) = x` defines a new function constant `f`, or adds a new method to `f` if `f` is already defined; this usage is equivalent to `function f(x); x; end`.
  209 * `a[i] = v` calls [`setindex!`](@ref)`(a,v,i)`.
  210 * `a.b = c` calls [`setproperty!`](@ref)`(a,:b,c)`.
  211 * Inside a function call, `f(a=b)` passes `b` as the value of keyword argument `a`.
  212 * Inside parentheses with commas, `(a=1,)` constructs a [`NamedTuple`](@ref).
  213 
  214 # Examples
  215 Assigning `a` to `b` does not create a copy of `b`; instead use [`copy`](@ref) or [`deepcopy`](@ref).
  216 
  217 ```jldoctest
  218 julia> b = [1]; a = b; b[1] = 2; a
  219 1-element Array{Int64,1}:
  220  2
  221 
  222 julia> b = [1]; a = copy(b); b[1] = 2; a
  223 1-element Array{Int64,1}:
  224  1
  225 
  226 ```
  227 Collections passed to functions are also not copied. Functions can modify (mutate) the contents of the objects their arguments refer to. (The names of functions which do this are conventionally suffixed with '!'.)
  228 ```jldoctest
  229 julia> function f!(x); x[:] .+= 1; end
  230 f! (generic function with 1 method)
  231 
  232 julia> a = [1]; f!(a); a
  233 1-element Array{Int64,1}:
  234  2
  235 
  236 ```
  237 Assignment can operate on multiple variables in parallel, taking values from an iterable:
  238 ```jldoctest
  239 julia> a, b = 4, 5
  240 (4, 5)
  241 
  242 julia> a, b = 1:3
  243 1:3
  244 
  245 julia> a, b
  246 (1, 2)
  247 
  248 ```
  249 Assignment can operate on multiple variables in series, and will return the value of the right-hand-most expression:
  250 ```jldoctest
  251 julia> a = [1]; b = [2]; c = [3]; a = b = c
  252 1-element Array{Int64,1}
  253  3
  254 
  255 julia> b[1] = 2; a, b, c
  256 ([2], [2], [2])
  257 
  258 ```
  259 Assignment at out-of-bounds indices does not grow a collection. If the collection is a [`Vector`](@ref) it can instead be grown with [`push!`](@ref) or [`append!`](@ref).
  260 ```jldoctest
  261 julia> a = [1, 1]; a[3] = 2
  262 ERROR: BoundsError: attempt to access 2-element Array{Int64,1} at index [3]
  263 [...]
  264 
  265 julia> push!(a, 2, 3)
  266 4-element Array{Int64,1}:
  267  1
  268  1
  269  2
  270  3
  271 
  272 ```
  273 Assigning `[]` does not eliminate elements from a collection; instead use `filter!`.
  274 ```jldoctest
  275 julia> a = collect(1:3); a[a .<= 1] = []
  276 ERROR: DimensionMismatch("tried to assign 0 elements to 1 destinations")
  277 [...]
  278 
  279 julia> filter!(x -> x > 1, a) # in-place & thus more efficient than a = a[a .> 1]
  280 2-element Array{Int64,1}:
  281  2
  282  3
  283 
  284 ```
  285 """
  286 kw"="
  287 
  288 """
  289     let
  290 
  291 `let` statements allocate new variable bindings each time they run. Whereas an
  292 assignment modifies an existing value location, `let` creates new locations. This
  293 difference is only detectable in the case of variables that outlive their scope via
  294 closures. The `let` syntax accepts a comma-separated series of assignments and variable
  295 names:
  296 
  297 ```julia
  298 let var1 = value1, var2, var3 = value3
  299     code
  300 end
  301 ```
  302 The assignments are evaluated in order, with each right-hand side evaluated in the scope
  303 before the new variable on the left-hand side has been introduced. Therefore it makes
  304 sense to write something like `let x = x`, since the two `x` variables are distinct and
  305 have separate storage.
  306 """
  307 kw"let"
  308 
  309 """
  310     quote
  311 
  312 `quote` creates multiple expression objects in a block without using the explicit `Expr`
  313 constructor. For example:
  314 
  315 ```julia
  316 ex = quote
  317     x = 1
  318     y = 2
  319     x + y
  320 end
  321 ```
  322 Unlike the other means of quoting, `:( ... )`, this form introduces `QuoteNode` elements
  323 to the expression tree, which must be considered when directly manipulating the tree.
  324 For other purposes, `:( ... )` and `quote .. end` blocks are treated identically.
  325 """
  326 kw"quote"
  327 
  328 """
  329     Expr(head::Symbol, args...)
  330 
  331 A type representing compound expressions in parsed julia code (ASTs).
  332 Each expression consists of a `head` Symbol identifying which kind of
  333 expression it is (e.g. a call, for loop, conditional statement, etc.),
  334 and subexpressions (e.g. the arguments of a call).
  335 The subexpressions are stored in a `Vector{Any}` field called `args`.
  336 
  337 See the manual chapter on [Metaprogramming](@ref) and the developer
  338 documentation [Julia ASTs](@ref).
  339 
  340 # Examples
  341 ```jldoctest
  342 julia> Expr(:call, :+, 1, 2)
  343 :(1 + 2)
  344 
  345 julia> dump(:(a ? b : c))
  346 Expr
  347   head: Symbol if
  348   args: Array{Any}((3,))
  349     1: Symbol a
  350     2: Symbol b
  351     3: Symbol c
  352 ```
  353 """
  354 Expr
  355 
  356 """
  357     '
  358 
  359 The conjugate transposition operator, see [`adjoint`](@ref).
  360 
  361 # Examples
  362 ```jldoctest
  363 julia> A = [1.0 -2.0im; 4.0im 2.0]
  364 2×2 Array{Complex{Float64},2}:
  365  1.0+0.0im  -0.0-2.0im
  366  0.0+4.0im   2.0+0.0im
  367 
  368 julia> A'
  369 2×2 Array{Complex{Float64},2}:
  370   1.0-0.0im  0.0-4.0im
  371  -0.0+2.0im  2.0-0.0im
  372 ```
  373 """
  374 kw"'"
  375 
  376 """
  377     const
  378 
  379 `const` is used to declare global variables whose values will not change. In almost all code
  380 (and particularly performance sensitive code) global variables should be declared
  381 constant in this way.
  382 
  383 ```julia
  384 const x = 5
  385 ```
  386 
  387 Multiple variables can be declared within a single `const`:
  388 ```julia
  389 const y, z = 7, 11
  390 ```
  391 
  392 Note that `const` only applies to one `=` operation, therefore `const x = y = 1`
  393 declares `x` to be constant but not `y`. On the other hand, `const x = const y = 1`
  394 declares both `x` and `y` constant.
  395 
  396 Note that "constant-ness" does not extend into mutable containers; only the
  397 association between a variable and its value is constant.
  398 If `x` is an array or dictionary (for example) you can still modify, add, or remove elements.
  399 
  400 In some cases changing the value of a `const` variable gives a warning instead of
  401 an error.
  402 However, this can produce unpredictable behavior or corrupt the state of your program,
  403 and so should be avoided.
  404 This feature is intended only for convenience during interactive use.
  405 """
  406 kw"const"
  407 
  408 """
  409     function
  410 
  411 Functions are defined with the `function` keyword:
  412 
  413 ```julia
  414 function add(a, b)
  415     return a + b
  416 end
  417 ```
  418 Or the short form notation:
  419 
  420 ```julia
  421 add(a, b) = a + b
  422 ```
  423 
  424 The use of the [`return`](@ref) keyword is exactly the same as in other languages,
  425 but is often optional. A function without an explicit `return` statement will return
  426 the last expression in the function body.
  427 """
  428 kw"function"
  429 
  430 """
  431     return
  432 
  433 `return x` causes the enclosing function to exit early, passing the given value `x`
  434 back to its caller. `return` by itself with no value is equivalent to `return nothing`
  435 (see [`nothing`](@ref)).
  436 
  437 ```julia
  438 function compare(a, b)
  439     a == b && return "equal to"
  440     a < b ? "less than" : "greater than"
  441 end
  442 ```
  443 In general you can place a `return` statement anywhere within a function body, including
  444 within deeply nested loops or conditionals, but be careful with `do` blocks. For
  445 example:
  446 
  447 ```julia
  448 function test1(xs)
  449     for x in xs
  450         iseven(x) && return 2x
  451     end
  452 end
  453 
  454 function test2(xs)
  455     map(xs) do x
  456         iseven(x) && return 2x
  457         x
  458     end
  459 end
  460 ```
  461 In the first example, the return breaks out of `test1` as soon as it hits
  462 an even number, so `test1([5,6,7])` returns `12`.
  463 
  464 You might expect the second example to behave the same way, but in fact the `return`
  465 there only breaks out of the *inner* function (inside the `do` block) and gives a value
  466 back to `map`. `test2([5,6,7])` then returns `[5,12,7]`.
  467 
  468 When used in a top-level expression (i.e. outside any function), `return` causes
  469 the entire current top-level expression to terminate early.
  470 """
  471 kw"return"
  472 
  473 """
  474     if/elseif/else
  475 
  476 `if`/`elseif`/`else` performs conditional evaluation, which allows portions of code to
  477 be evaluated or not evaluated depending on the value of a boolean expression. Here is
  478 the anatomy of the `if`/`elseif`/`else` conditional syntax:
  479 
  480 ```julia
  481 if x < y
  482     println("x is less than y")
  483 elseif x > y
  484     println("x is greater than y")
  485 else
  486     println("x is equal to y")
  487 end
  488 ```
  489 If the condition expression `x < y` is true, then the corresponding block is evaluated;
  490 otherwise the condition expression `x > y` is evaluated, and if it is true, the
  491 corresponding block is evaluated; if neither expression is true, the `else` block is
  492 evaluated. The `elseif` and `else` blocks are optional, and as many `elseif` blocks as
  493 desired can be used.
  494 """
  495 kw"if", kw"elseif", kw"else"
  496 
  497 """
  498     for
  499 
  500 `for` loops repeatedly evaluate a block of statements while
  501 iterating over a sequence of values.
  502 
  503 # Examples
  504 ```jldoctest
  505 julia> for i in [1, 4, 0]
  506            println(i)
  507        end
  508 1
  509 4
  510 0
  511 ```
  512 """
  513 kw"for"
  514 
  515 """
  516     while
  517 
  518 `while` loops repeatedly evaluate a conditional expression, and continue evaluating the
  519 body of the while loop as long as the expression remains true. If the condition
  520 expression is false when the while loop is first reached, the body is never evaluated.
  521 
  522 # Examples
  523 ```jldoctest
  524 julia> i = 1
  525 1
  526 
  527 julia> while i < 5
  528            println(i)
  529            global i += 1
  530        end
  531 1
  532 2
  533 3
  534 4
  535 ```
  536 """
  537 kw"while"
  538 
  539 """
  540     end
  541 
  542 `end` marks the conclusion of a block of expressions, for example
  543 [`module`](@ref), [`struct`](@ref), [`mutable struct`](@ref),
  544 [`begin`](@ref), [`let`](@ref), [`for`](@ref) etc.
  545 `end` may also be used when indexing into an array to represent
  546 the last index of a dimension.
  547 
  548 # Examples
  549 ```jldoctest
  550 julia> A = [1 2; 3 4]
  551 2×2 Array{Int64,2}:
  552  1  2
  553  3  4
  554 
  555 julia> A[end, :]
  556 2-element Array{Int64,1}:
  557  3
  558  4
  559 ```
  560 """
  561 kw"end"
  562 
  563 """
  564     try/catch
  565 
  566 A `try`/`catch` statement allows intercepting errors (exceptions) thrown
  567 by [`throw`](@ref) so that program execution can continue.
  568 For example, the following code attempts to write a file, but warns the user
  569 and proceeds instead of terminating execution if the file cannot be written:
  570 
  571 ```julia
  572 try
  573     open("/danger", "w") do f
  574         println(f, "Hello")
  575     end
  576 catch
  577     @warn "Could not write file."
  578 end
  579 ```
  580 
  581 The syntax `catch e` (where `e` is any variable) assigns the thrown
  582 exception object to the given variable within the `catch` block.
  583 
  584 The power of the `try`/`catch` construct lies in the ability to unwind a deeply
  585 nested computation immediately to a much higher level in the stack of calling functions.
  586 """
  587 kw"try", kw"catch"
  588 
  589 """
  590     finally
  591 
  592 Run some code when a given block of code exits, regardless
  593 of how it exits. For example, here is how we can guarantee that an opened file is
  594 closed:
  595 
  596 ```julia
  597 f = open("file")
  598 try
  599     operate_on_file(f)
  600 finally
  601     close(f)
  602 end
  603 ```
  604 
  605 When control leaves the [`try`](@ref) block (for example, due to a [`return`](@ref), or just finishing
  606 normally), [`close(f)`](@ref) will be executed. If the `try` block exits due to an exception,
  607 the exception will continue propagating. A `catch` block may be combined with `try` and
  608 `finally` as well. In this case the `finally` block will run after `catch` has handled
  609 the error.
  610 """
  611 kw"finally"
  612 
  613 """
  614     break
  615 
  616 Break out of a loop immediately.
  617 
  618 # Examples
  619 ```jldoctest
  620 julia> i = 0
  621 0
  622 
  623 julia> while true
  624            global i += 1
  625            i > 5 && break
  626            println(i)
  627        end
  628 1
  629 2
  630 3
  631 4
  632 5
  633 ```
  634 """
  635 kw"break"
  636 
  637 """
  638     continue
  639 
  640 Skip the rest of the current loop iteration.
  641 
  642 # Examples
  643 ```jldoctest
  644 julia> for i = 1:6
  645            iseven(i) && continue
  646            println(i)
  647        end
  648 1
  649 3
  650 5
  651 ```
  652 """
  653 kw"continue"
  654 
  655 """
  656     do
  657 
  658 Create an anonymous function and pass it as the first argument to
  659 a function call.
  660 For example:
  661 
  662 ```julia
  663 map(1:10) do x
  664     2x
  665 end
  666 ```
  667 
  668 is equivalent to `map(x->2x, 1:10)`.
  669 
  670 Use multiple arguments like so:
  671 
  672 ```julia
  673 map(1:10, 11:20) do x, y
  674     x + y
  675 end
  676 ```
  677 """
  678 kw"do"
  679 
  680 """
  681     ...
  682 
  683 The "splat" operator, `...`, represents a sequence of arguments.
  684 `...` can be used in function definitions, to indicate that the function
  685 accepts an arbitrary number of arguments.
  686 `...` can also be used to apply a function to a sequence of arguments.
  687 
  688 # Examples
  689 ```jldoctest
  690 julia> add(xs...) = reduce(+, xs)
  691 add (generic function with 1 method)
  692 
  693 julia> add(1, 2, 3, 4, 5)
  694 15
  695 
  696 julia> add([1, 2, 3]...)
  697 6
  698 
  699 julia> add(7, 1:100..., 1000:1100...)
  700 111107
  701 ```
  702 """
  703 kw"..."
  704 
  705 """
  706     ;
  707 
  708 `;` has a similar role in Julia as in many C-like languages, and is used to delimit the
  709 end of the previous statement. `;` is not necessary after new lines, but can be used to
  710 separate statements on a single line or to join statements into a single expression.
  711 `;` is also used to suppress output printing in the REPL and similar interfaces.
  712 
  713 # Examples
  714 ```julia
  715 julia> function foo()
  716            x = "Hello, "; x *= "World!"
  717            return x
  718        end
  719 foo (generic function with 1 method)
  720 
  721 julia> bar() = (x = "Hello, Mars!"; return x)
  722 bar (generic function with 1 method)
  723 
  724 julia> foo();
  725 
  726 julia> bar()
  727 "Hello, Mars!"
  728 ```
  729 """
  730 kw";"
  731 
  732 """
  733     x && y
  734 
  735 Short-circuiting boolean AND.
  736 """
  737 kw"&&"
  738 
  739 """
  740     x || y
  741 
  742 Short-circuiting boolean OR.
  743 """
  744 kw"||"
  745 
  746 """
  747     ccall((function_name, library), returntype, (argtype1, ...), argvalue1, ...)
  748     ccall(function_name, returntype, (argtype1, ...), argvalue1, ...)
  749     ccall(function_pointer, returntype, (argtype1, ...), argvalue1, ...)
  750 
  751 Call a function in a C-exported shared library, specified by the tuple `(function_name, library)`,
  752 where each component is either a string or symbol. Instead of specifying a library,
  753 one can also use a `function_name` symbol or string, which is resolved in the current process.
  754 Alternatively, `ccall` may also be used to call a function pointer `function_pointer`, such as one returned by `dlsym`.
  755 
  756 Note that the argument type tuple must be a literal tuple, and not a tuple-valued
  757 variable or expression.
  758 
  759 Each `argvalue` to the `ccall` will be converted to the corresponding
  760 `argtype`, by automatic insertion of calls to `unsafe_convert(argtype,
  761 cconvert(argtype, argvalue))`. (See also the documentation for
  762 [`unsafe_convert`](@ref Base.unsafe_convert) and [`cconvert`](@ref Base.cconvert) for further details.)
  763 In most cases, this simply results in a call to `convert(argtype, argvalue)`.
  764 """
  765 kw"ccall"
  766 
  767 """
  768     llvmcall(IR::String, ReturnType, (ArgumentType1, ...), ArgumentValue1, ...)
  769     llvmcall((declarations::String, IR::String), ReturnType, (ArgumentType1, ...), ArgumentValue1, ...)
  770 
  771 Call LLVM IR string in the first argument. Similar to an LLVM function `define` block,
  772 arguments are available as consecutive unnamed SSA variables (%0, %1, etc.).
  773 
  774 The optional declarations string contains external functions declarations that are
  775 necessary for llvm to compile the IR string. Multiple declarations can be passed in by
  776 separating them with line breaks.
  777 
  778 Note that the argument type tuple must be a literal tuple, and not a tuple-valued
  779 variable or expression.
  780 
  781 Each `ArgumentValue` to `llvmcall` will be converted to the corresponding
  782 `ArgumentType`, by automatic insertion of calls to `unsafe_convert(ArgumentType,
  783 cconvert(ArgumentType, ArgumentValue))`. (See also the documentation for
  784 [`unsafe_convert`](@ref Base.unsafe_convert) and [`cconvert`](@ref Base.cconvert) for further details.)
  785 In most cases, this simply results in a call to `convert(ArgumentType, ArgumentValue)`.
  786 
  787 See `test/llvmcall.jl` for usage examples.
  788 """
  789 Core.Intrinsics.llvmcall
  790 
  791 """
  792     begin
  793 
  794 `begin...end` denotes a block of code.
  795 
  796 ```julia
  797 begin
  798     println("Hello, ")
  799     println("World!")
  800 end
  801 ```
  802 
  803 Usually `begin` will not be necessary, since keywords such as [`function`](@ref) and [`let`](@ref)
  804 implicitly begin blocks of code. See also [`;`](@ref).
  805 """
  806 kw"begin"
  807 
  808 """
  809     struct
  810 
  811 The most commonly used kind of type in Julia is a struct, specified as a name and a
  812 set of fields.
  813 
  814 ```julia
  815 struct Point
  816     x
  817     y
  818 end
  819 ```
  820 
  821 Fields can have type restrictions, which may be parameterized:
  822 
  823 ```julia
  824     struct Point{X}
  825         x::X
  826         y::Float64
  827     end
  828 ```
  829 
  830 A struct can also declare an abstract super type via `<:` syntax:
  831 
  832 ```julia
  833 struct Point <: AbstractPoint
  834     x
  835     y
  836 end
  837 ```
  838 
  839 `struct`s are immutable by default; an instance of one of these types cannot
  840 be modified after construction. Use [`mutable struct`](@ref) instead to declare a
  841 type whose instances can be modified.
  842 
  843 See the manual section on [Composite Types](@ref) for more details,
  844 such as how to define constructors.
  845 """
  846 kw"struct"
  847 
  848 """
  849     mutable struct
  850 
  851 `mutable struct` is similar to [`struct`](@ref), but additionally allows the
  852 fields of the type to be set after construction. See the manual section on
  853 [Composite Types](@ref) for more information.
  854 """
  855 kw"mutable struct"
  856 
  857 """
  858     new
  859 
  860 Special function available to inner constructors which created a new object
  861 of the type.
  862 See the manual section on [Inner Constructor Methods](@ref) for more information.
  863 """
  864 kw"new"
  865 
  866 """
  867     where
  868 
  869 The `where` keyword creates a type that is an iterated union of other types, over all
  870 values of some variable. For example `Vector{T} where T<:Real` includes all [`Vector`](@ref)s
  871 where the element type is some kind of `Real` number.
  872 
  873 The variable bound defaults to `Any` if it is omitted:
  874 
  875 ```julia
  876 Vector{T} where T    # short for `where T<:Any`
  877 ```
  878 Variables can also have lower bounds:
  879 
  880 ```julia
  881 Vector{T} where T>:Int
  882 Vector{T} where Int<:T<:Real
  883 ```
  884 There is also a concise syntax for nested `where` expressions. For example, this:
  885 
  886 ```julia
  887 Pair{T, S} where S<:Array{T} where T<:Number
  888 ```
  889 can be shortened to:
  890 
  891 ```julia
  892 Pair{T, S} where {T<:Number, S<:Array{T}}
  893 ```
  894 This form is often found on method signatures.
  895 
  896 Note that in this form, the variables are listed outermost-first. This matches the
  897 order in which variables are substituted when a type is "applied" to parameter values
  898 using the syntax `T{p1, p2, ...}`.
  899 """
  900 kw"where"
  901 
  902 """
  903     ans
  904 
  905 A variable referring to the last computed value, automatically set at the interactive prompt.
  906 """
  907 kw"ans"
  908 
  909 """
  910     devnull
  911 
  912 Used in a stream redirect to discard all data written to it. Essentially equivalent to
  913 /dev/null on Unix or NUL on Windows. Usage:
  914 
  915 ```julia
  916 run(pipeline(`cat test.txt`, devnull))
  917 ```
  918 """
  919 devnull
  920 
  921 # doc strings for code in boot.jl and built-ins
  922 
  923 """
  924     Nothing
  925 
  926 A type with no fields that is the type of [`nothing`](@ref).
  927 """
  928 Nothing
  929 
  930 """
  931     nothing
  932 
  933 The singleton instance of type [`Nothing`](@ref), used by convention when there is no value to return
  934 (as in a C `void` function) or when a variable or field holds no value.
  935 """
  936 nothing
  937 
  938 """
  939     Core.TypeofBottom
  940 
  941 The singleton type containing only the value `Union{}` (which represents the empty type).
  942 """
  943 Core.TypeofBottom
  944 
  945 """
  946     Function
  947 
  948 Abstract type of all functions.
  949 
  950 ```jldoctest
  951 julia> isa(+, Function)
  952 true
  953 
  954 julia> typeof(sin)
  955 typeof(sin)
  956 
  957 julia> ans <: Function
  958 true
  959 ```
  960 """
  961 Function
  962 
  963 """
  964     ReadOnlyMemoryError()
  965 
  966 An operation tried to write to memory that is read-only.
  967 """
  968 ReadOnlyMemoryError
  969 
  970 """
  971     ErrorException(msg)
  972 
  973 Generic error type. The error message, in the `.msg` field, may provide more specific details.
  974 
  975 # Example
  976 ```jldoctest
  977 julia> ex = ErrorException("I've done a bad thing");
  978 
  979 julia> ex.msg
  980 "I've done a bad thing"
  981 ```
  982 """
  983 ErrorException
  984 
  985 """
  986     WrappedException(msg)
  987 
  988 Generic type for `Exception`s wrapping another `Exception`, such as `LoadError` and
  989 `InitError`. Those exceptions contain information about the root cause of an
  990 exception. Subtypes define a field `error` containing the causing `Exception`.
  991 """
  992 Core.WrappedException
  993 
  994 """
  995     UndefRefError()
  996 
  997 The item or field is not defined for the given object.
  998 """
  999 UndefRefError
 1000 
 1001 """
 1002     Float32(x [, mode::RoundingMode])
 1003 
 1004 Create a `Float32` from `x`. If `x` is not exactly representable then `mode` determines how
 1005 `x` is rounded.
 1006 
 1007 # Examples
 1008 ```jldoctest
 1009 julia> Float32(1/3, RoundDown)
 1010 0.3333333f0
 1011 
 1012 julia> Float32(1/3, RoundUp)
 1013 0.33333334f0
 1014 ```
 1015 
 1016 See [`RoundingMode`](@ref) for available rounding modes.
 1017 """
 1018 Float32(x)
 1019 
 1020 """
 1021     Float64(x [, mode::RoundingMode])
 1022 
 1023 Create a `Float64` from `x`. If `x` is not exactly representable then `mode` determines how
 1024 `x` is rounded.
 1025 
 1026 # Examples
 1027 ```jldoctest
 1028 julia> Float64(pi, RoundDown)
 1029 3.141592653589793
 1030 
 1031 julia> Float64(pi, RoundUp)
 1032 3.1415926535897936
 1033 ```
 1034 
 1035 See [`RoundingMode`](@ref) for available rounding modes.
 1036 """
 1037 Float64(x)
 1038 
 1039 """
 1040     OutOfMemoryError()
 1041 
 1042 An operation allocated too much memory for either the system or the garbage collector to
 1043 handle properly.
 1044 """
 1045 OutOfMemoryError
 1046 
 1047 """
 1048     BoundsError([a],[i])
 1049 
 1050 An indexing operation into an array, `a`, tried to access an out-of-bounds element at index `i`.
 1051 
 1052 # Examples
 1053 ```jldoctest; filter = r"Stacktrace:(\\n \\[[0-9]+\\].*)*"
 1054 julia> A = fill(1.0, 7);
 1055 
 1056 julia> A[8]
 1057 ERROR: BoundsError: attempt to access 7-element Array{Float64,1} at index [8]
 1058 Stacktrace:
 1059  [1] getindex(::Array{Float64,1}, ::Int64) at ./array.jl:660
 1060  [2] top-level scope
 1061 
 1062 julia> B = fill(1.0, (2,3));
 1063 
 1064 julia> B[2, 4]
 1065 ERROR: BoundsError: attempt to access 2×3 Array{Float64,2} at index [2, 4]
 1066 Stacktrace:
 1067  [1] getindex(::Array{Float64,2}, ::Int64, ::Int64) at ./array.jl:661
 1068  [2] top-level scope
 1069 
 1070 julia> B[9]
 1071 ERROR: BoundsError: attempt to access 2×3 Array{Float64,2} at index [9]
 1072 Stacktrace:
 1073  [1] getindex(::Array{Float64,2}, ::Int64) at ./array.jl:660
 1074  [2] top-level scope
 1075 ```
 1076 """
 1077 BoundsError
 1078 
 1079 """
 1080     InexactError(name::Symbol, T, val)
 1081 
 1082 Cannot exactly convert `val` to type `T` in a method of function `name`.
 1083 
 1084 # Examples
 1085 ```jldoctest
 1086 julia> convert(Float64, 1+2im)
 1087 ERROR: InexactError: Float64(1 + 2im)
 1088 Stacktrace:
 1089 [...]
 1090 ```
 1091 """
 1092 InexactError
 1093 
 1094 """
 1095     DomainError(val)
 1096     DomainError(val, msg)
 1097 
 1098 The argument `val` to a function or constructor is outside the valid domain.
 1099 
 1100 # Examples
 1101 ```jldoctest
 1102 julia> sqrt(-1)
 1103 ERROR: DomainError with -1.0:
 1104 sqrt will only return a complex result if called with a complex argument. Try sqrt(Complex(x)).
 1105 Stacktrace:
 1106 [...]
 1107 ```
 1108 """
 1109 DomainError
 1110 
 1111 """
 1112     Task(func)
 1113 
 1114 Create a `Task` (i.e. coroutine) to execute the given function `func` (which must be
 1115 callable with no arguments). The task exits when this function returns.
 1116 
 1117 # Examples
 1118 ```jldoctest
 1119 julia> a() = sum(i for i in 1:1000);
 1120 
 1121 julia> b = Task(a);
 1122 ```
 1123 
 1124 In this example, `b` is a runnable `Task` that hasn't started yet.
 1125 """
 1126 Task
 1127 
 1128 """
 1129     StackOverflowError()
 1130 
 1131 The function call grew beyond the size of the call stack. This usually happens when a call
 1132 recurses infinitely.
 1133 """
 1134 StackOverflowError
 1135 
 1136 """
 1137     nfields(x) -> Int
 1138 
 1139 Get the number of fields in the given object.
 1140 
 1141 # Examples
 1142 ```jldoctest
 1143 julia> a = 1//2;
 1144 
 1145 julia> nfields(a)
 1146 2
 1147 
 1148 julia> b = 1
 1149 1
 1150 
 1151 julia> nfields(b)
 1152 0
 1153 
 1154 julia> ex = ErrorException("I've done a bad thing");
 1155 
 1156 julia> nfields(ex)
 1157 1
 1158 ```
 1159 
 1160 In these examples, `a` is a [`Rational`](@ref), which has two fields.
 1161 `b` is an `Int`, which is a primitive bitstype with no fields at all.
 1162 `ex` is an [`ErrorException`](@ref), which has one field.
 1163 """
 1164 nfields
 1165 
 1166 """
 1167     UndefVarError(var::Symbol)
 1168 
 1169 A symbol in the current scope is not defined.
 1170 
 1171 # Examples
 1172 ```jldoctest
 1173 julia> a
 1174 ERROR: UndefVarError: a not defined
 1175 
 1176 julia> a = 1;
 1177 
 1178 julia> a
 1179 1
 1180 ```
 1181 """
 1182 UndefVarError
 1183 
 1184 """
 1185     UndefKeywordError(var::Symbol)
 1186 
 1187 The required keyword argument `var` was not assigned in a function call.
 1188 """
 1189 UndefKeywordError
 1190 
 1191 """
 1192     OverflowError(msg)
 1193 
 1194 The result of an expression is too large for the specified type and will cause a wraparound.
 1195 """
 1196 OverflowError
 1197 
 1198 """
 1199     TypeError(func::Symbol, context::AbstractString, expected::Type, got)
 1200 
 1201 A type assertion failure, or calling an intrinsic function with an incorrect argument type.
 1202 """
 1203 TypeError
 1204 
 1205 """
 1206     InterruptException()
 1207 
 1208 The process was stopped by a terminal interrupt (CTRL+C).
 1209 """
 1210 InterruptException
 1211 
 1212 """
 1213     applicable(f, args...) -> Bool
 1214 
 1215 Determine whether the given generic function has a method applicable to the given arguments.
 1216 
 1217 See also [`hasmethod`](@ref).
 1218 
 1219 # Examples
 1220 ```jldoctest
 1221 julia> function f(x, y)
 1222            x + y
 1223        end;
 1224 
 1225 julia> applicable(f, 1)
 1226 false
 1227 
 1228 julia> applicable(f, 1, 2)
 1229 true
 1230 ```
 1231 """
 1232 applicable
 1233 
 1234 """
 1235     invoke(f, argtypes::Type, args...; kwargs...)
 1236 
 1237 Invoke a method for the given generic function `f` matching the specified types `argtypes` on the
 1238 specified arguments `args` and passing the keyword arguments `kwargs`. The arguments `args` must
 1239 conform with the specified types in `argtypes`, i.e. conversion is not automatically performed.
 1240 This method allows invoking a method other than the most specific matching method, which is useful
 1241 when the behavior of a more general definition is explicitly needed (often as part of the
 1242 implementation of a more specific method of the same function).
 1243 
 1244 # Examples
 1245 ```jldoctest
 1246 julia> f(x::Real) = x^2;
 1247 
 1248 julia> f(x::Integer) = 1 + invoke(f, Tuple{Real}, x);
 1249 
 1250 julia> f(2)
 1251 5
 1252 ```
 1253 """
 1254 invoke
 1255 
 1256 """
 1257     isa(x, type) -> Bool
 1258 
 1259 Determine whether `x` is of the given `type`. Can also be used as an infix operator, e.g.
 1260 `x isa type`.
 1261 
 1262 # Examples
 1263 ```jldoctest
 1264 julia> isa(1, Int)
 1265 true
 1266 
 1267 julia> isa(1, Matrix)
 1268 false
 1269 
 1270 julia> isa(1, Char)
 1271 false
 1272 
 1273 julia> isa(1, Number)
 1274 true
 1275 
 1276 julia> 1 isa Number
 1277 true
 1278 ```
 1279 """
 1280 isa
 1281 
 1282 """
 1283     DivideError()
 1284 
 1285 Integer division was attempted with a denominator value of 0.
 1286 
 1287 # Examples
 1288 ```jldoctest
 1289 julia> 2/0
 1290 Inf
 1291 
 1292 julia> div(2, 0)
 1293 ERROR: DivideError: integer division error
 1294 Stacktrace:
 1295 [...]
 1296 ```
 1297 """
 1298 DivideError
 1299 
 1300 """
 1301     Number
 1302 
 1303 Abstract supertype for all number types.
 1304 """
 1305 Number
 1306 
 1307 """
 1308     Real <: Number
 1309 
 1310 Abstract supertype for all real numbers.
 1311 """
 1312 Real
 1313 
 1314 """
 1315     AbstractFloat <: Real
 1316 
 1317 Abstract supertype for all floating point numbers.
 1318 """
 1319 AbstractFloat
 1320 
 1321 """
 1322     Integer <: Real
 1323 
 1324 Abstract supertype for all integers.
 1325 """
 1326 Integer
 1327 
 1328 """
 1329     Signed <: Integer
 1330 
 1331 Abstract supertype for all signed integers.
 1332 """
 1333 Signed
 1334 
 1335 """
 1336     Unsigned <: Integer
 1337 
 1338 Abstract supertype for all unsigned integers.
 1339 """
 1340 Unsigned
 1341 
 1342 """
 1343     Bool <: Integer
 1344 
 1345 Boolean type, containing the values `true` and `false`.
 1346 """
 1347 Bool
 1348 
 1349 for bit in (16, 32, 64)
 1350     @eval begin
 1351         """
 1352             Float$($bit) <: AbstractFloat
 1353 
 1354         $($bit)-bit floating point number type.
 1355         """
 1356         $(Symbol("Float", bit))
 1357     end
 1358 end
 1359 
 1360 for bit in (8, 16, 32, 64, 128)
 1361     @eval begin
 1362         """
 1363             Int$($bit) <: Signed
 1364 
 1365         $($bit)-bit signed integer type.
 1366         """
 1367         $(Symbol("Int", bit))
 1368 
 1369         """
 1370             UInt$($bit) <: Unsigned
 1371 
 1372         $($bit)-bit unsigned integer type.
 1373         """
 1374         $(Symbol("UInt", bit))
 1375     end
 1376 end
 1377 
 1378 """
 1379     Symbol
 1380 
 1381 The type of object used to represent identifiers in parsed julia code (ASTs).
 1382 Also often used as a name or label to identify an entity (e.g. as a dictionary key).
 1383 `Symbol`s can be entered using the `:` quote operator:
 1384 ```jldoctest
 1385 julia> :name
 1386 :name
 1387 
 1388 julia> typeof(:name)
 1389 Symbol
 1390 
 1391 julia> x = 42
 1392 42
 1393 
 1394 julia> eval(:x)
 1395 42
 1396 ```
 1397 `Symbol`s can also be constructed from strings or other values by calling the
 1398 constructor `Symbol(x...)`.
 1399 
 1400 `Symbol`s are immutable and should be compared using `===`.
 1401 The implementation re-uses the same object for all `Symbol`s with the same name,
 1402 so comparison tends to be efficient (it can just compare pointers).
 1403 
 1404 Unlike strings, `Symbol`s are "atomic" or "scalar" entities that do not support
 1405 iteration over characters.
 1406 """
 1407 Symbol
 1408 
 1409 """
 1410     Symbol(x...) -> Symbol
 1411 
 1412 Create a [`Symbol`](@ref) by concatenating the string representations of the arguments together.
 1413 
 1414 # Examples
 1415 ```jldoctest
 1416 julia> Symbol("my", "name")
 1417 :myname
 1418 
 1419 julia> Symbol("day", 4)
 1420 :day4
 1421 ```
 1422 """
 1423 Symbol(x...)
 1424 
 1425 """
 1426     tuple(xs...)
 1427 
 1428 Construct a tuple of the given objects.
 1429 
 1430 # Examples
 1431 ```jldoctest
 1432 julia> tuple(1, 'a', pi)
 1433 (1, 'a', π = 3.1415926535897...)
 1434 ```
 1435 """
 1436 tuple
 1437 
 1438 """
 1439     getfield(value, name::Symbol)
 1440 
 1441 Extract a named field from a `value` of composite type.
 1442 See also [`getproperty`](@ref Base.getproperty).
 1443 
 1444 # Examples
 1445 ```jldoctest
 1446 julia> a = 1//2
 1447 1//2
 1448 
 1449 julia> getfield(a, :num)
 1450 1
 1451 
 1452 julia> a.num
 1453 1
 1454 ```
 1455 """
 1456 getfield
 1457 
 1458 """
 1459     setfield!(value, name::Symbol, x)
 1460 
 1461 Assign `x` to a named field in `value` of composite type.
 1462 The `value` must be mutable and `x` must be a subtype of `fieldtype(typeof(value), name)`.
 1463 See also [`setproperty!`](@ref Base.setproperty!).
 1464 
 1465 # Examples
 1466 ```jldoctest
 1467 julia> mutable struct MyMutableStruct
 1468            field::Int
 1469        end
 1470 
 1471 julia> a = MyMutableStruct(1);
 1472 
 1473 julia> setfield!(a, :field, 2);
 1474 
 1475 julia> getfield(a, :field)
 1476 2
 1477 
 1478 julia> a = 1//2
 1479 1//2
 1480 
 1481 julia> setfield!(a, :num, 3);
 1482 ERROR: setfield! immutable struct of type Rational cannot be changed
 1483 ```
 1484 """
 1485 setfield!
 1486 
 1487 """
 1488     typeof(x)
 1489 
 1490 Get the concrete type of `x`.
 1491 
 1492 # Examples
 1493 ```jldoctest
 1494 julia> a = 1//2;
 1495 
 1496 julia> typeof(a)
 1497 Rational{Int64}
 1498 
 1499 julia> M = [1 2; 3.5 4];
 1500 
 1501 julia> typeof(M)
 1502 Array{Float64,2}
 1503 ```
 1504 """
 1505 typeof
 1506 
 1507 """
 1508     isdefined(m::Module, s::Symbol)
 1509     isdefined(object, s::Symbol)
 1510     isdefined(object, index::Int)
 1511 
 1512 Tests whether a global variable or object field is defined. The arguments can be a module and a symbol
 1513 or a composite object and field name (as a symbol) or index.
 1514 
 1515 To test whether an array element is defined, use [`isassigned`](@ref) instead.
 1516 
 1517 # Examples
 1518 ```jldoctest
 1519 julia> isdefined(Base, :sum)
 1520 true
 1521 
 1522 julia> isdefined(Base, :NonExistentMethod)
 1523 false
 1524 
 1525 julia> a = 1//2;
 1526 
 1527 julia> isdefined(a, 2)
 1528 true
 1529 
 1530 julia> isdefined(a, 3)
 1531 false
 1532 
 1533 julia> isdefined(a, :num)
 1534 true
 1535 
 1536 julia> isdefined(a, :numerator)
 1537 false
 1538 ```
 1539 """
 1540 isdefined
 1541 
 1542 
 1543 """
 1544     Vector{T}(undef, n)
 1545 
 1546 Construct an uninitialized [`Vector{T}`](@ref) of length `n`. See [`undef`](@ref).
 1547 
 1548 # Examples
 1549 ```julia-repl
 1550 julia> Vector{Float64}(undef, 3)
 1551 3-element Array{Float64,1}:
 1552  6.90966e-310
 1553  6.90966e-310
 1554  6.90966e-310
 1555 ```
 1556 """
 1557 Vector{T}(::UndefInitializer, n)
 1558 
 1559 """
 1560     Vector{T}(nothing, m)
 1561 
 1562 Construct a [`Vector{T}`](@ref) of length `m`, initialized with
 1563 [`nothing`](@ref) entries. Element type `T` must be able to hold
 1564 these values, i.e. `Nothing <: T`.
 1565 
 1566 # Examples
 1567 ```jldoctest
 1568 julia> Vector{Union{Nothing, String}}(nothing, 2)
 1569 2-element Array{Union{Nothing, String},1}:
 1570  nothing
 1571  nothing
 1572 ```
 1573 """
 1574 Vector{T}(::Nothing, n)
 1575 
 1576 """
 1577     Vector{T}(missing, m)
 1578 
 1579 Construct a [`Vector{T}`](@ref) of length `m`, initialized with
 1580 [`missing`](@ref) entries. Element type `T` must be able to hold
 1581 these values, i.e. `Missing <: T`.
 1582 
 1583 # Examples
 1584 ```jldoctest
 1585 julia> Vector{Union{Missing, String}}(missing, 2)
 1586 2-element Array{Union{Missing, String},1}:
 1587  missing
 1588  missing
 1589 ```
 1590 """
 1591 Vector{T}(::Missing, n)
 1592 
 1593 """
 1594     Matrix{T}(undef, m, n)
 1595 
 1596 Construct an uninitialized [`Matrix{T}`](@ref) of size `m`×`n`. See [`undef`](@ref).
 1597 
 1598 # Examples
 1599 ```julia-repl
 1600 julia> Matrix{Float64}(undef, 2, 3)
 1601 2×3 Array{Float64,2}:
 1602  6.93517e-310  6.93517e-310  6.93517e-310
 1603  6.93517e-310  6.93517e-310  1.29396e-320
 1604 ```
 1605 """
 1606 Matrix{T}(::UndefInitializer, m, n)
 1607 
 1608 """
 1609     Matrix{T}(nothing, m, n)
 1610 
 1611 Construct a [`Matrix{T}`](@ref) of size `m`×`n`, initialized with
 1612 [`nothing`](@ref) entries. Element type `T` must be able to hold
 1613 these values, i.e. `Nothing <: T`.
 1614 
 1615 # Examples
 1616 ```jldoctest
 1617 julia> Matrix{Union{Nothing, String}}(nothing, 2, 3)
 1618 2×3 Array{Union{Nothing, String},2}:
 1619  nothing  nothing  nothing
 1620  nothing  nothing  nothing
 1621 ```
 1622 """
 1623 Matrix{T}(::Nothing, m, n)
 1624 
 1625 """
 1626     Matrix{T}(missing, m, n)
 1627 
 1628 Construct a [`Matrix{T}`](@ref) of size `m`×`n`, initialized with
 1629 [`missing`](@ref) entries. Element type `T` must be able to hold
 1630 these values, i.e. `Missing <: T`.
 1631 
 1632 # Examples
 1633 ```jldoctest
 1634 julia> Matrix{Union{Missing, String}}(missing, 2, 3)
 1635 2×3 Array{Union{Missing, String},2}:
 1636  missing  missing  missing
 1637  missing  missing  missing
 1638 ```
 1639 """
 1640 Matrix{T}(::Missing, m, n)
 1641 
 1642 """
 1643     Array{T}(undef, dims)
 1644     Array{T,N}(undef, dims)
 1645 
 1646 Construct an uninitialized `N`-dimensional [`Array`](@ref)
 1647 containing elements of type `T`. `N` can either be supplied explicitly,
 1648 as in `Array{T,N}(undef, dims)`, or be determined by the length or number of `dims`.
 1649 `dims` may be a tuple or a series of integer arguments corresponding to the lengths
 1650 in each dimension. If the rank `N` is supplied explicitly, then it must
 1651 match the length or number of `dims`. See [`undef`](@ref).
 1652 
 1653 # Examples
 1654 ```julia-repl
 1655 julia> A = Array{Float64,2}(undef, 2, 3) # N given explicitly
 1656 2×3 Array{Float64,2}:
 1657  6.90198e-310  6.90198e-310  6.90198e-310
 1658  6.90198e-310  6.90198e-310  0.0
 1659 
 1660 julia> B = Array{Float64}(undef, 2) # N determined by the input
 1661 2-element Array{Float64,1}:
 1662  1.87103e-320
 1663  0.0
 1664 ```
 1665 """
 1666 Array{T,N}(::UndefInitializer, dims)
 1667 
 1668 """
 1669     Array{T}(nothing, dims)
 1670     Array{T,N}(nothing, dims)
 1671 
 1672 Construct an `N`-dimensional [`Array`](@ref) containing elements of type `T`,
 1673 initialized with [`nothing`](@ref) entries. Element type `T` must be able
 1674 to hold these values, i.e. `Nothing <: T`.
 1675 
 1676 # Examples
 1677 ```jldoctest
 1678 julia> Array{Union{Nothing, String}}(nothing, 2)
 1679 2-element Array{Union{Nothing, String},1}:
 1680  nothing
 1681  nothing
 1682 
 1683 julia> Array{Union{Nothing, Int}}(nothing, 2, 3)
 1684 2×3 Array{Union{Nothing, Int64},2}:
 1685  nothing  nothing  nothing
 1686  nothing  nothing  nothing
 1687 ```
 1688 """
 1689 Array{T,N}(::Nothing, dims)
 1690 
 1691 
 1692 """
 1693     Array{T}(missing, dims)
 1694     Array{T,N}(missing, dims)
 1695 
 1696 Construct an `N`-dimensional [`Array`](@ref) containing elements of type `T`,
 1697 initialized with [`missing`](@ref) entries. Element type `T` must be able
 1698 to hold these values, i.e. `Missing <: T`.
 1699 
 1700 # Examples
 1701 ```jldoctest
 1702 julia> Array{Union{Missing, String}}(missing, 2)
 1703 2-element Array{Union{Missing, String},1}:
 1704  missing
 1705  missing
 1706 
 1707 julia> Array{Union{Missing, Int}}(missing, 2, 3)
 1708 2×3 Array{Union{Missing, Int64},2}:
 1709  missing  missing  missing
 1710  missing  missing  missing
 1711 ```
 1712 """
 1713 Array{T,N}(::Missing, dims)
 1714 
 1715 """
 1716     UndefInitializer
 1717 
 1718 Singleton type used in array initialization, indicating the array-constructor-caller
 1719 would like an uninitialized array. See also [`undef`](@ref),
 1720 an alias for `UndefInitializer()`.
 1721 
 1722 # Examples
 1723 ```julia-repl
 1724 julia> Array{Float64,1}(UndefInitializer(), 3)
 1725 3-element Array{Float64,1}:
 1726  2.2752528595e-314
 1727  2.202942107e-314
 1728  2.275252907e-314
 1729 ```
 1730 """
 1731 UndefInitializer
 1732 
 1733 """
 1734     undef
 1735 
 1736 Alias for `UndefInitializer()`, which constructs an instance of the singleton type
 1737 [`UndefInitializer`](@ref), used in array initialization to indicate the
 1738 array-constructor-caller would like an uninitialized array.
 1739 
 1740 # Examples
 1741 ```julia-repl
 1742 julia> Array{Float64,1}(undef, 3)
 1743 3-element Array{Float64,1}:
 1744  2.2752528595e-314
 1745  2.202942107e-314
 1746  2.275252907e-314
 1747 ```
 1748 """
 1749 undef
 1750 
 1751 """
 1752     +(x, y...)
 1753 
 1754 Addition operator. `x+y+z+...` calls this function with all arguments, i.e. `+(x, y, z, ...)`.
 1755 
 1756 # Examples
 1757 ```jldoctest
 1758 julia> 1 + 20 + 4
 1759 25
 1760 
 1761 julia> +(1, 20, 4)
 1762 25
 1763 ```
 1764 """
 1765 (+)(x, y...)
 1766 
 1767 """
 1768     -(x)
 1769 
 1770 Unary minus operator.
 1771 
 1772 # Examples
 1773 ```jldoctest
 1774 julia> -1
 1775 -1
 1776 
 1777 julia> -(2)
 1778 -2
 1779 
 1780 julia> -[1 2; 3 4]
 1781 2×2 Array{Int64,2}:
 1782  -1  -2
 1783  -3  -4
 1784 ```
 1785 """
 1786 -(x)
 1787 
 1788 """
 1789     -(x, y)
 1790 
 1791 Subtraction operator.
 1792 
 1793 # Examples
 1794 ```jldoctest
 1795 julia> 2 - 3
 1796 -1
 1797 
 1798 julia> -(2, 4.5)
 1799 -2.5
 1800 ```
 1801 """
 1802 -(x, y)
 1803 
 1804 """
 1805     *(x, y...)
 1806 
 1807 Multiplication operator. `x*y*z*...` calls this function with all arguments, i.e. `*(x, y, z, ...)`.
 1808 
 1809 # Examples
 1810 ```jldoctest
 1811 julia> 2 * 7 * 8
 1812 112
 1813 
 1814 julia> *(2, 7, 8)
 1815 112
 1816 ```
 1817 """
 1818 (*)(x, y...)
 1819 
 1820 """
 1821     /(x, y)
 1822 
 1823 Right division operator: multiplication of `x` by the inverse of `y` on the right. Gives
 1824 floating-point results for integer arguments.
 1825 
 1826 # Examples
 1827 ```jldoctest
 1828 julia> 1/2
 1829 0.5
 1830 
 1831 julia> 4/2
 1832 2.0
 1833 
 1834 julia> 4.5/2
 1835 2.25
 1836 ```
 1837 """
 1838 /(x, y)
 1839 
 1840 """
 1841     ArgumentError(msg)
 1842 
 1843 The parameters to a function call do not match a valid signature. Argument `msg` is a
 1844 descriptive error string.
 1845 """
 1846 ArgumentError
 1847 
 1848 """
 1849     MethodError(f, args)
 1850 
 1851 A method with the required type signature does not exist in the given generic function.
 1852 Alternatively, there is no unique most-specific method.
 1853 """
 1854 MethodError
 1855 
 1856 """
 1857     AssertionError([msg])
 1858 
 1859 The asserted condition did not evaluate to `true`.
 1860 Optional argument `msg` is a descriptive error string.
 1861 
 1862 # Examples
 1863 ```jldoctest
 1864 julia> @assert false "this is not true"
 1865 ERROR: AssertionError: this is not true
 1866 ```
 1867 
 1868 `AssertionError` is usually thrown from [`@assert`](@ref).
 1869 """
 1870 AssertionError
 1871 
 1872 """
 1873     LoadError(file::AbstractString, line::Int, error)
 1874 
 1875 An error occurred while `include`ing, `require`ing, or [`using`](@ref) a file. The error specifics
 1876 should be available in the `.error` field.
 1877 """
 1878 LoadError
 1879 
 1880 """
 1881     InitError(mod::Symbol, error)
 1882 
 1883 An error occurred when running a module's `__init__` function. The actual error thrown is
 1884 available in the `.error` field.
 1885 """
 1886 InitError
 1887 
 1888 """
 1889     Any::DataType
 1890 
 1891 `Any` is the union of all types. It has the defining property `isa(x, Any) == true` for any `x`. `Any` therefore
 1892 describes the entire universe of possible values. For example `Integer` is a subset of `Any` that includes `Int`,
 1893 `Int8`, and other integer types.
 1894 """
 1895 Any
 1896 
 1897 """
 1898     Union{}
 1899 
 1900 `Union{}`, the empty [`Union`](@ref) of types, is the type that has no values. That is, it has the defining
 1901 property `isa(x, Union{}) == false` for any `x`. `Base.Bottom` is defined as its alias and the type of `Union{}`
 1902 is `Core.TypeofBottom`.
 1903 
 1904 # Examples
 1905 ```jldoctest
 1906 julia> isa(nothing, Union{})
 1907 false
 1908 ```
 1909 """
 1910 kw"Union{}", Base.Bottom
 1911 
 1912 """
 1913     Union{Types...}
 1914 
 1915 A type union is an abstract type which includes all instances of any of its argument types. The empty
 1916 union [`Union{}`](@ref) is the bottom type of Julia.
 1917 
 1918 # Examples
 1919 ```jldoctest
 1920 julia> IntOrString = Union{Int,AbstractString}
 1921 Union{Int64, AbstractString}
 1922 
 1923 julia> 1 :: IntOrString
 1924 1
 1925 
 1926 julia> "Hello!" :: IntOrString
 1927 "Hello!"
 1928 
 1929 julia> 1.0 :: IntOrString
 1930 ERROR: TypeError: in typeassert, expected Union{Int64, AbstractString}, got Float64
 1931 ```
 1932 """
 1933 Union
 1934 
 1935 
 1936 """
 1937     UnionAll
 1938 
 1939 A union of types over all values of a type parameter. `UnionAll` is used to describe parametric types
 1940 where the values of some parameters are not known.
 1941 
 1942 # Examples
 1943 ```jldoctest
 1944 julia> typeof(Vector)
 1945 UnionAll
 1946 
 1947 julia> typeof(Vector{Int})
 1948 DataType
 1949 ```
 1950 """
 1951 UnionAll
 1952 
 1953 """
 1954     ::
 1955 
 1956 With the `::`-operator type annotations are attached to expressions and variables in programs.
 1957 See the manual section on [Type Declarations](@ref).
 1958 
 1959 Outside of declarations `::` is used to assert that expressions and variables in programs have a given type.
 1960 
 1961 # Examples
 1962 ```jldoctest
 1963 julia> (1+2)::AbstractFloat
 1964 ERROR: TypeError: typeassert: expected AbstractFloat, got Int64
 1965 
 1966 julia> (1+2)::Int
 1967 3
 1968 ```
 1969 """
 1970 kw"::"
 1971 
 1972 """
 1973     Vararg{T,N}
 1974 
 1975 The last parameter of a tuple type [`Tuple`](@ref) can be the special type `Vararg`, which denotes any
 1976 number of trailing elements. The type `Vararg{T,N}` corresponds to exactly `N` elements of type `T`.
 1977 `Vararg{T}` corresponds to zero or more elements of type `T`. `Vararg` tuple types are used to represent the
 1978 arguments accepted by varargs methods (see the section on [Varargs Functions](@ref) in the manual.)
 1979 
 1980 # Examples
 1981 ```jldoctest
 1982 julia> mytupletype = Tuple{AbstractString,Vararg{Int}}
 1983 Tuple{AbstractString,Vararg{Int64,N} where N}
 1984 
 1985 julia> isa(("1",), mytupletype)
 1986 true
 1987 
 1988 julia> isa(("1",1), mytupletype)
 1989 true
 1990 
 1991 julia> isa(("1",1,2), mytupletype)
 1992 true
 1993 
 1994 julia> isa(("1",1,2,3.0), mytupletype)
 1995 false
 1996 ```
 1997 """
 1998 Vararg
 1999 
 2000 """
 2001     Tuple{Types...}
 2002 
 2003 Tuples are an abstraction of the arguments of a function – without the function itself. The salient aspects of
 2004 a function's arguments are their order and their types. Therefore a tuple type is similar to a parameterized
 2005 immutable type where each parameter is the type of one field. Tuple types may have any number of parameters.
 2006 
 2007 Tuple types are covariant in their parameters: `Tuple{Int}` is a subtype of `Tuple{Any}`. Therefore `Tuple{Any}`
 2008 is considered an abstract type, and tuple types are only concrete if their parameters are. Tuples do not have
 2009 field names; fields are only accessed by index.
 2010 
 2011 See the manual section on [Tuple Types](@ref).
 2012 """
 2013 Tuple
 2014 
 2015 """
 2016 The base library of Julia.
 2017 """
 2018 kw"Base"
 2019 
 2020 """
 2021     typeassert(x, type)
 2022 
 2023 Throw a TypeError unless `x isa type`.
 2024 The syntax `x::type` calls this function.
 2025 """
 2026 typeassert
 2027 
 2028 """
 2029     getproperty(value, name::Symbol)
 2030 
 2031 The syntax `a.b` calls `getproperty(a, :b)`.
 2032 
 2033 # Examples
 2034 ```jldoctest
 2035 julia> struct MyType
 2036            x
 2037        end
 2038 
 2039 julia> function Base.getproperty(obj::MyType, sym::Symbol)
 2040            if sym === :special
 2041                return obj.x + 1
 2042            else # fallback to getfield
 2043                return getfield(obj, sym)
 2044            end
 2045        end
 2046 
 2047 julia> obj = MyType(1);
 2048 
 2049 julia> obj.special
 2050 2
 2051 
 2052 julia> obj.x
 2053 1
 2054 ```
 2055 
 2056 See also [`propertynames`](@ref Base.propertynames) and
 2057 [`setproperty!`](@ref Base.setproperty!).
 2058 """
 2059 Base.getproperty
 2060 
 2061 """
 2062     setproperty!(value, name::Symbol, x)
 2063 
 2064 The syntax `a.b = c` calls `setproperty!(a, :b, c)`.
 2065 
 2066 See also [`propertynames`](@ref Base.propertynames) and
 2067 [`getproperty`](@ref Base.getproperty).
 2068 """
 2069 Base.setproperty!
 2070 
 2071 """
 2072     StridedArray{T, N}
 2073 
 2074 An `N` dimensional *strided* array with elements of type `T`. These arrays follow
 2075 the [strided array interface](@ref man-interface-strided-arrays). If `A` is a
 2076 `StridedArray`, then its elements are stored in memory with offsets, which may
 2077 vary between dimensions but are constant within a dimension. For example, `A` could
 2078 have stride 2 in dimension 1, and stride 3 in dimension 2. Incrementing `A` along
 2079 dimension `d` jumps in memory by [`strides(A, d)`] slots. Strided arrays are
 2080 particularly important and useful because they can sometimes be passed directly
 2081 as pointers to foreign language libraries like BLAS.
 2082 """
 2083 StridedArray
 2084 
 2085 """
 2086     StridedVector{T}
 2087 
 2088 One dimensional [`StridedArray`](@ref) with elements of type `T`.
 2089 """
 2090 StridedVector
 2091 
 2092 """
 2093     StridedMatrix{T}
 2094 
 2095 Two dimensional [`StridedArray`](@ref) with elements of type `T`.
 2096 """
 2097 StridedMatrix
 2098 
 2099 """
 2100     StridedVecOrMat{T}
 2101 
 2102 Union type of [`StridedVector`](@ref) and [`StridedMatrix`](@ref) with elements of type `T`.
 2103 """
 2104 StridedVecOrMat
 2105 
 2106 end