From 49ca51fc3ac35ee3ab25cdad9747c9c0719ffe5e Mon Sep 17 00:00:00 2001 From: Eleanor Bartle Date: Sat, 19 Dec 2020 00:04:03 +1100 Subject: [PATCH] Clarify condusing wording regarding `%` and `/` Previous wording made it seem like any signed or floating-point value would be allowed at comptime, whereas negative values do not work with `%`, and negative integers do not work with `/`. --- doc/langref.html.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/langref.html.in b/doc/langref.html.in index 4da04f41e8..7c8d1c6662 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -1300,10 +1300,10 @@ a /= b{#endsyntax#}
  • Can cause {#link|overflow|Default Operations#} for integers.
  • Can cause {#link|Division by Zero#} for integers.
  • Can cause {#link|Division by Zero#} for floats in {#link|FloatMode.Optimized Mode|Floating Point Operations#}.
  • -
  • For non-compile-time-known signed integers, must use +
  • Signed integer operands must be comptime-known and positive. In other cases, use {#link|@divTrunc#}, {#link|@divFloor#}, or - {#link|@divExact#} instead of {#syntax#}/{#endsyntax#}. + {#link|@divExact#} instead.
  • Invokes {#link|Peer Type Resolution#} for the operands.
  • @@ -1325,9 +1325,9 @@ a %= b{#endsyntax#}