authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-03-03 22:14:29-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-03-03 22:14:29-05:00
log8aaab75af05c6066d8f952259d0d540f92c4772e
tree3ab6e7b003ce89b06a59d12c329870b3fbd9a277
parentc0c9303bd63468afe146ad729cf963ee06a1777f
signaturelock-open Commit is signed but in an unrecognized format.

docs: remove reference to deprecated builtins

closes #3959

1 files changed, 10 insertions(+), 7 deletions(-)

doc/langref.html.in+10-7
......@@ -6019,13 +6019,16 @@ pub fn printf(self: *OutStream, arg0: i32, arg1: []const u8) !void {
60196019 </p>
60206020 {#code_begin|syntax#}
60216021pub fn printValue(self: *OutStream, value: var) !void {
6022 const T = @TypeOf(value);
6023 if (@isInteger(T)) {
6024 return self.printInt(T, value);
6025 } else if (@isFloat(T)) {
6026 return self.printFloat(T, value);
6027 } else {
6028 @compileError("Unable to print type '" ++ @typeName(T) ++ "'");
6022 switch (@typeInfo(@TypeOf(value))) {
6023 .Int => {
6024 return self.printInt(T, value);
6025 },
6026 .Float => {
6027 return self.printFloat(T, value);
6028 },
6029 else => {
6030 @compileError("Unable to print type '" ++ @typeName(T) ++ "'");
6031 },
60296032 }
60306033}
60316034 {#code_end#}