authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2016-09-09 12:10:27-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2016-09-10 20:53:57-04:00
log077cd4b9a46d431b09698554d321d7dad1bca8ca
treeab19a93ac2b5181a1dc95f56baea4d96759498d3
parent9e92dbdd0889a68e32cde85c1a07767200a9ad7e

langref: correct builtin function names


1 files changed, 20 insertions(+), 20 deletions(-)

doc/langref.md+20-20
...@@ -398,10 +398,10 @@ false otherwise....@@ -398,10 +398,10 @@ false otherwise.
398398
399```399```
400Function Operation400Function Operation
401@add_with_overflow(inline T: type, a: T, b: T, result: &T) -> bool *x = a + b401@addWithOverflow(inline T: type, a: T, b: T, result: &T) -> bool *x = a + b
402@sub_with_overflow(inline T: type, a: T, b: T, result: &T) -> bool *x = a - b402@subWithOverflow(inline T: type, a: T, b: T, result: &T) -> bool *x = a - b
403@mul_with_overflow(inline T: type, a: T, b: T, result: &T) -> bool *x = a * b403@mulWithOverflow(inline T: type, a: T, b: T, result: &T) -> bool *x = a * b
404@shl_with_overflow(inline T: type, a: T, b: T, result: &T) -> bool *x = a << b404@shlWithOverflow(inline T: type, a: T, b: T, result: &T) -> bool *x = a << b
405```405```
406406
407### @memset(dest, c: u8, byte_count: usize)407### @memset(dest, c: u8, byte_count: usize)
...@@ -437,7 +437,7 @@ debuggers to break there....@@ -437,7 +437,7 @@ debuggers to break there.
437437
438This function is only valid within function scope.438This function is only valid within function scope.
439439
440### @return_address()440### @returnAddress()
441441
442This function returns a pointer to the return address of the current stack442This function returns a pointer to the return address of the current stack
443frame.443frame.
...@@ -447,7 +447,7 @@ all platforms....@@ -447,7 +447,7 @@ all platforms.
447447
448This function is only valid within function scope.448This function is only valid within function scope.
449449
450### @frame_address()450### @frameAddress()
451451
452This function returns the base pointer of the current stack frame.452This function returns the base pointer of the current stack frame.
453453
...@@ -457,21 +457,21 @@ aggressive optimizations....@@ -457,21 +457,21 @@ aggressive optimizations.
457457
458This function is only valid within function scope.458This function is only valid within function scope.
459459
460### @max_value(inline T: type) -> (number literal)460### @maxValue(inline T: type) -> (number literal)
461461
462This function returns the maximum integer value of the integer type T.462This function returns the maximum integer value of the integer type T.
463463
464The result is a compile time constant. For some types such as `c_long`, the464The result is a compile time constant. For some types such as `c_long`, the
465result is marked as depending on a compile variable.465result is marked as depending on a compile variable.
466466
467### @min_value(inline T: type) -> (number literal)467### @minValue(inline T: type) -> (number literal)
468468
469This function returns the minimum integer value of the integer type T.469This function returns the minimum integer value of the integer type T.
470470
471The result is a compile time constant. For some types such as `c_long`, the471The result is a compile time constant. For some types such as `c_long`, the
472result is marked as depending on a compile variable.472result is marked as depending on a compile variable.
473473
474### @member_count(inline T: type) -> (number literal)474### @memberCount(inline T: type) -> (number literal)
475475
476This function returns the number of enum values in an enum type.476This function returns the number of enum values in an enum type.
477477
...@@ -487,7 +487,7 @@ such as "std"....@@ -487,7 +487,7 @@ such as "std".
487487
488This function is only valid at top level scope.488This function is only valid at top level scope.
489489
490### @c_import(expression) -> (namespace)490### @cImport(expression) -> (namespace)
491491
492This function parses C code and imports the functions, types, variables, and492This function parses C code and imports the functions, types, variables, and
493compatible macro definitions into the result namespace.493compatible macro definitions into the result namespace.
...@@ -498,25 +498,25 @@ appending to a temporary buffer which is then parsed as C code....@@ -498,25 +498,25 @@ appending to a temporary buffer which is then parsed as C code.
498498
499This function is only valid at top level scope.499This function is only valid at top level scope.
500500
501### @c_include(inline path: []u8)501### @cInclude(inline path: []u8)
502502
503This function can only occur inside `@c_import`.503This function can only occur inside `@c_import`.
504504
505This appends `#include <$path>\n` to the `c_import` temporary buffer.505This appends `#include <$path>\n` to the `c_import` temporary buffer.
506506
507### @c_define(inline name: []u8, value)507### @cDefine(inline name: []u8, value)
508508
509This function can only occur inside `@c_import`.509This function can only occur inside `@c_import`.
510510
511This appends `#define $name $value` to the `c_import` temporary buffer.511This appends `#define $name $value` to the `c_import` temporary buffer.
512512
513### @c_undef(inline name: []u8)513### @cUndef(inline name: []u8)
514514
515This function can only occur inside `@c_import`.515This function can only occur inside `@c_import`.
516516
517This appends `#undef $name` to the `c_import` temporary buffer.517This appends `#undef $name` to the `c_import` temporary buffer.
518518
519### @compile_var(inline name: []u8) -> (varying type)519### @compileVar(inline name: []u8) -> (varying type)
520520
521This function returns a compile-time variable. There are built in compile521This function returns a compile-time variable. There are built in compile
522variables:522variables:
...@@ -533,7 +533,7 @@ Build scripts can set additional compile variables of any name and type....@@ -533,7 +533,7 @@ Build scripts can set additional compile variables of any name and type.
533The result of this function is a compile time constant that is marked as533The result of this function is a compile time constant that is marked as
534depending on a compile variable.534depending on a compile variable.
535535
536### @const_eval(expression) -> @typeof(expression)536### @constEval(expression) -> @typeof(expression)
537537
538This function wraps an expression and generates a compile error if the538This function wraps an expression and generates a compile error if the
539expression is not known at compile time.539expression is not known at compile time.
...@@ -550,7 +550,7 @@ type T....@@ -550,7 +550,7 @@ type T.
550This function counts the number of leading zeroes in x which is an integer550This function counts the number of leading zeroes in x which is an integer
551type T.551type T.
552552
553### @err_name(err: error) -> []u8553### @errorName(err: error) -> []u8
554554
555This function returns the string representation of an error. If an error555This function returns the string representation of an error. If an error
556declaration is:556declaration is:
...@@ -564,7 +564,7 @@ Then the string representation is "OutOfMem"....@@ -564,7 +564,7 @@ Then the string representation is "OutOfMem".
564If there are no calls to `@err_name` in an entire application, then no error564If there are no calls to `@err_name` in an entire application, then no error
565name table will be generated.565name table will be generated.
566566
567### @embed_file(inline path: []u8) -> [X]u8567### @embedFile(inline path: []u8) -> [X]u8
568568
569This function returns a compile time constant fixed-size array with length569This function returns a compile time constant fixed-size array with length
570equal to the byte count of the file given by `path`. The contents of the array570equal to the byte count of the file given by `path`. The contents of the array
...@@ -578,7 +578,7 @@ This function performs an atomic compare exchange operation....@@ -578,7 +578,7 @@ This function performs an atomic compare exchange operation.
578578
579The `fence` function is used to introduce happens-before edges between operations.579The `fence` function is used to introduce happens-before edges between operations.
580580
581### @div_exact(a: T, b: T) -> T581### @divExact(a: T, b: T) -> T
582582
583This function performs integer division `a / b` and returns the result.583This function performs integer division `a / b` and returns the result.
584584
...@@ -608,13 +608,13 @@ const b: u8 = @truncate(u8, a);...@@ -608,13 +608,13 @@ const b: u8 = @truncate(u8, a);
608// b is now 0xcd608// b is now 0xcd
609```609```
610610
611### @compile_err(inline msg: []u8)611### @compileError(inline msg: []u8)
612612
613This function, when semantically analyzed, causes a compile error with the message `msg`.613This function, when semantically analyzed, causes a compile error with the message `msg`.
614614
615There are several ways that code avoids being semantically checked, such as using `if`615There are several ways that code avoids being semantically checked, such as using `if`
616or `switch` with compile time constants, and inline functions.616or `switch` with compile time constants, and inline functions.
617617
618### @int_type(inline is_signed: bool, inline bit_count: u8) -> type618### @intType(inline is_signed: bool, inline bit_count: u8) -> type
619619
620This function returns an integer type with the given signness and bit count.620This function returns an integer type with the given signness and bit count.