@@ -1904,7 +1904,7 @@ Any[
1904
1904
1905
1905
julia> @enum FRUIT apple=1 orange=2 kiwi=3
1906
1906
1907
- julia> f(x::FRUIT) = \" I'm a FRUIT with value: \$ (int (x))\"
1907
+ julia> f(x::FRUIT) = \" I'm a FRUIT with value: \$ (Int (x))\"
1908
1908
f (generic function with 1 method)
1909
1909
1910
1910
julia> f(apple)
@@ -2299,8 +2299,25 @@ Any[
2299
2299
(" Base" ," @time" ," @time()
2300
2300
2301
2301
A macro to execute an expression, printing the time it took to
2302
- execute and the total number of bytes its execution caused to be
2303
- allocated, before returning the value of the expression.
2302
+ execute, the number of allocations, and the total number of bytes
2303
+ its execution caused to be allocated, before returning the value of
2304
+ the expression.
2305
+
2306
+ " ),
2307
+
2308
+ (" Base" ," @timev" ," @timev()
2309
+
2310
+ This is a verbose version of the \" @time\" macro, it first prints
2311
+ the same information as \" @time\" , then any non-zero memory
2312
+ allocation counters, and then returns the value of the expression.
2313
+
2314
+ " ),
2315
+
2316
+ (" Base" ," @timed" ," @timed()
2317
+
2318
+ A macro to execute an expression, and return the value of the
2319
+ expression, elapsed time, total bytes allocated, garbage collection
2320
+ time, and an object with various memory allocation counters.
2304
2321
2305
2322
" ),
2306
2323
@@ -2316,7 +2333,12 @@ Any[
2316
2333
2317
2334
A macro to evaluate an expression, discarding the resulting value,
2318
2335
instead returning the total number of bytes allocated during
2319
- evaluation of the expression.
2336
+ evaluation of the expression. Note: the expression is evaluated
2337
+ inside a local function, instead of the current context, in order
2338
+ to eliminate the effects of compilation, however, there still may
2339
+ be some allocations due to JIT compilation. This also makes the
2340
+ results inconsistent with the \" @time\" macros, which do not try to
2341
+ adjust for the effects of compilation.
2320
2342
2321
2343
" ),
2322
2344
@@ -5261,10 +5283,10 @@ Millisecond(v)
5261
5283
5262
5284
" ),
5263
5285
5264
- (" Base" ," mv" ," mv(src::AbstractString,dst::AbstractString; remove_destination::Bool=false)
5286
+ (" Base" ," mv" ," mv(src::AbstractString, dst::AbstractString; remove_destination::Bool=false)
5265
5287
5266
5288
Move the file, link, or directory from *src* to *dest*.
5267
- \" remove_destination=true\" will first remove an existing ` dst` .
5289
+ \" remove_destination=true\" will first remove an existing * dst* .
5268
5290
5269
5291
" ),
5270
5292
@@ -5295,16 +5317,18 @@ Millisecond(v)
5295
5317
5296
5318
" ),
5297
5319
5298
- (" Base" ," mktemp" ," mktemp()
5320
+ (" Base" ," mktemp" ," mktemp([parent=tempdir()] )
5299
5321
5300
5322
Returns \" (path, io)\" , where \" path\" is the path of a new
5301
- temporary file and \" io\" is an open file object for this path.
5323
+ temporary file in \" parent\" and \" io\" is an open file object for
5324
+ this path.
5302
5325
5303
5326
" ),
5304
5327
5305
- (" Base" ," mktempdir" ," mktempdir()
5328
+ (" Base" ," mktempdir" ," mktempdir([parent=tempdir()] )
5306
5329
5307
- Create a temporary directory and return its path.
5330
+ Create a temporary directory in the \" parent\" directory and return
5331
+ its path.
5308
5332
5309
5333
" ),
5310
5334
@@ -5355,6 +5379,12 @@ Millisecond(v)
5355
5379
5356
5380
" ),
5357
5381
5382
+ (" Base" ," ismount" ," ismount(path) -> Bool
5383
+
5384
+ Returns \" true\" if \" path\" is a mount point, \" false\" otherwise.
5385
+
5386
+ " ),
5387
+
5358
5388
(" Base" ," ispath" ," ispath(path) -> Bool
5359
5389
5360
5390
Returns \" true\" if \" path\" is a valid filesystem path, \" false\"
@@ -6199,8 +6229,8 @@ base64encode(args...)
6199
6229
6200
6230
(" Base" ," base64decode" ," base64decode(string)
6201
6231
6202
- Decodes the base64-encoded \" string\" and returns the obtained
6203
- bytes.
6232
+ Decodes the base64-encoded \" string\" and returns a
6233
+ \" Vector{UInt8} \" of the decoded bytes.
6204
6234
6205
6235
" ),
6206
6236
@@ -6901,6 +6931,15 @@ popdisplay(d::Display)
6901
6931
6902
6932
" ),
6903
6933
6934
+ (" Base" ," vecdot" ," vecdot(x, y)
6935
+
6936
+ For any iterable containers \" x\" and \" y\" (including arrays of
6937
+ any dimension) of numbers (or any element type for which \" dot\" is
6938
+ defined), compute the Euclidean dot product (the sum of
6939
+ \" dot(x[i],y[i])\" ) as if they were vectors.
6940
+
6941
+ " ),
6942
+
6904
6943
(" Base" ," cross" ," cross(x, y)
6905
6944
×(x, y)
6906
6945
@@ -7715,8 +7754,9 @@ popdisplay(d::Display)
7715
7754
(" Base" ," vecnorm" ," vecnorm(A[, p])
7716
7755
7717
7756
For any iterable container \" A\" (including arrays of any
7718
- dimension) of numbers, compute the \" p\" -norm (defaulting to
7719
- \" p=2\" ) as if \" A\" were a vector of the corresponding length.
7757
+ dimension) of numbers (or any element type for which \" norm\" is
7758
+ defined), compute the \" p\" -norm (defaulting to \" p=2\" ) as if
7759
+ \" A\" were a vector of the corresponding length.
7720
7760
7721
7761
For example, if \" A\" is a matrix and \" p=2\" , then this is
7722
7762
equivalent to the Frobenius norm.
@@ -11539,8 +11579,8 @@ golden
11539
11579
11540
11580
(" Base" ," @task" ," @task()
11541
11581
11542
- Wrap an expression in a Task executing it, and return the Task.
11543
- This only creates a task, and does not run it.
11582
+ Wrap an expression in a Task without executing it, and return the
11583
+ Task. This only creates a task, and does not run it.
11544
11584
11545
11585
" ),
11546
11586
@@ -12143,6 +12183,10 @@ golden
12143
12183
versions after. This is an inverse for both \" Pkg.checkout\" and
12144
12184
\" Pkg.pin\" .
12145
12185
12186
+ You can also supply an iterable collection of package names, e.g.,
12187
+ \" Pkg.free((\" Pkg1\" , \" Pkg2\" ))\" to free multiple packages at
12188
+ once.
12189
+
12146
12190
" ),
12147
12191
12148
12192
(" Base.Pkg" ," build" ," build()
@@ -12508,12 +12552,30 @@ golden
12508
12552
12509
12553
" ),
12510
12554
12555
+ (" Base" ," ascii" ," ascii(::Ptr{UInt8}[, length])
12556
+
12557
+ Create an ASCII string from the address of a C (0-terminated)
12558
+ string encoded in ASCII. A copy is made; the ptr can be safely
12559
+ freed. If \" length\" is specified, the string does not have to be
12560
+ 0-terminated.
12561
+
12562
+ " ),
12563
+
12511
12564
(" Base" ," utf8" ," utf8(::Array{UInt8, 1})
12512
12565
12513
12566
Create a UTF-8 string from a byte array.
12514
12567
12515
12568
" ),
12516
12569
12570
+ (" Base" ," utf8" ," utf8(::Ptr{UInt8}[, length])
12571
+
12572
+ Create a UTF-8 string from the address of a C (0-terminated) string
12573
+ encoded in UTF-8. A copy is made; the ptr can be safely freed. If
12574
+ \" length\" is specified, the string does not have to be
12575
+ 0-terminated.
12576
+
12577
+ " ),
12578
+
12517
12579
(" Base" ," utf8" ," utf8(s)
12518
12580
12519
12581
Convert a string to a contiguous UTF-8 string (all characters must
@@ -12584,24 +12646,24 @@ golden
12584
12646
12585
12647
" ),
12586
12648
12587
- (" Base" ," is_valid_ascii " ," is_valid_ascii(s ) -> Bool
12649
+ (" Base" ," isvalid " ," isvalid(value ) -> Bool
12588
12650
12589
- Returns true if the argument (\" ASCIIString\" , \" UTF8String\" , or
12590
- byte vector) is valid ASCII, false otherwise.
12651
+ Returns true if the given value is valid for its type, which
12652
+ currently can be one of \" Char\" , \" ASCIIString\" , \" UTF8String\" ,
12653
+ \" UTF16String\" , or \" UTF32String\"
12591
12654
12592
12655
" ),
12593
12656
12594
- (" Base" ," is_valid_utf8 " ," is_valid_utf8(s ) -> Bool
12657
+ (" Base" ," isvalid " ," isvalid(T, value ) -> Bool
12595
12658
12596
- Returns true if the argument (\" ASCIIString\" , \" UTF8String\" , or
12597
- byte vector) is valid UTF-8, false otherwise.
12598
-
12599
- " ),
12600
-
12601
- (" Base" ," is_valid_char" ," is_valid_char(c) -> Bool
12602
-
12603
- Returns true if the given char or integer is a valid Unicode code
12604
- point.
12659
+ Returns true if the given value is valid for that type. Types
12660
+ currently can be \" Char\" , \" ASCIIString\" , \" UTF8String\" ,
12661
+ \" UTF16String\" , or \" UTF32String\" Values for \" Char\" can be of
12662
+ type \" Char\" or \" UInt32\" Values for \" ASCIIString\" and
12663
+ \" UTF8String\" can be of that type, or \" Vector{UInt8}\" Values for
12664
+ \" UTF16String\" can be \" UTF16String\" or \" Vector{UInt16}\" Values
12665
+ for \" UTF32String\" can be \" UTF32String\" , \" Vector{Char}\" or
12666
+ \" Vector{UInt32}\"
12605
12667
12606
12668
" ),
12607
12669
@@ -13038,30 +13100,23 @@ golden
13038
13100
13039
13101
" ),
13040
13102
13041
- (" Base" ," is_valid_utf16" ," is_valid_utf16(s) -> Bool
13042
-
13043
- Returns true if the argument (\" UTF16String\" or \" UInt16\" array)
13044
- is valid UTF-16.
13045
-
13046
- " ),
13047
-
13048
13103
(" Base" ," utf32" ," utf32(s)
13049
13104
13050
- Create a UTF-32 string from a byte array, array of \" UInt32 \" , or
13051
- any other string type. (Conversions of byte arrays check for a
13052
- byte-order marker in the first four bytes, and do not include it in
13053
- the resulting string.)
13105
+ Create a UTF-32 string from a byte array, array of \" Char \" or
13106
+ \" UInt32 \" , or any other string type. (Conversions of byte arrays
13107
+ check for a byte-order marker in the first four bytes, and do not
13108
+ include it in the resulting string.)
13054
13109
13055
13110
Note that the resulting \" UTF32String\" data is terminated by the
13056
13111
NUL codepoint (32-bit zero), which is not treated as a character in
13057
13112
the string (so that it is mostly invisible in Julia); this allows
13058
13113
the string to be passed directly to external functions requiring
13059
13114
NUL-terminated data. This NUL is appended automatically by the
13060
- *utf32(s)* conversion function. If you have a \" UInt32 \" array
13061
- \" A\" that is already NUL-terminated UTF-32 data, then you can
13062
- instead use *UTF32String(A)`* to construct the string without
13063
- making a copy of the data and treating the NUL as a terminator
13064
- rather than as part of the string.
13115
+ *utf32(s)* conversion function. If you have a \" Char \" or
13116
+ \" UInt32 \" array \" A\" that is already NUL-terminated UTF-32 data,
13117
+ then you can instead use *UTF32String(A)`* to construct the string
13118
+ without making a copy of the data and treating the NUL as a
13119
+ terminator rather than as part of the string.
13065
13120
13066
13121
" ),
13067
13122
0 commit comments