From 9a5800dc3e98462512778bd909b8f5aadd9a3ff5 Mon Sep 17 00:00:00 2001 From: Lesenechal Remi Date: Wed, 25 Dec 2019 23:38:37 +0100 Subject: [PATCH] fix "boolean-if-else.md" --- .../docs/language-basics/boolean-if-else.md | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/gitlab-pages/docs/language-basics/boolean-if-else.md b/gitlab-pages/docs/language-basics/boolean-if-else.md index 751f4f1cd..d57e6fa99 100644 --- a/gitlab-pages/docs/language-basics/boolean-if-else.md +++ b/gitlab-pages/docs/language-basics/boolean-if-else.md @@ -11,18 +11,18 @@ Here's how to define a boolean: -```pascaligo +```pascaligo group=a const a: bool = True; const b: bool = False; ``` -```cameligo +```cameligo group=a let a: bool = true let b: bool = false ``` -```reasonligo +```reasonligo group=a let a: bool = true; let b: bool = false; ``` @@ -37,24 +37,24 @@ In LIGO, only values of the same type can be compared. We call these "comparable -```pascaligo +```pascaligo group=b const a: string = "Alice"; const b: string = "Alice"; // True const c: bool = (a = b); ``` -```cameligo +```cameligo group=b let a: string = "Alice" let b: string = "Alice" // true let c: bool = (a = b) ``` -```reasonligo +```reasonligo group=b let a: string = "Alice"; let b: string = "Alice"; -/* true */ +(* true *) let c: bool = (a == b); ``` @@ -64,7 +64,7 @@ let c: bool = (a == b); -```pascaligo +```pascaligo group=c const a: int = 5; const b: int = 4; const c: bool = (a = b); @@ -75,7 +75,7 @@ const g: bool = (a >= b); const h: bool = (a =/= b); ``` -```cameligo +```cameligo group=c let a: int = 5 let b: int = 4 let c: bool = (a = b) @@ -83,11 +83,11 @@ let d: bool = (a > b) let e: bool = (a < b) let f: bool = (a <= b) let g: bool = (a >= b) -let h: bool = (a =/= b) +let h: bool = (a <> b) ``` -```reasonligo +```reasonligo group=c let a: int = 5; let b: int = 4; let c: bool = (a == b); @@ -106,23 +106,23 @@ let h: bool = (a != b); -```pascaligo +```pascaligo group=d const a: tez = 5mutez; const b: tez = 10mutez; const c: bool = (a = b); ``` -```cameligo +```cameligo group=d let a: tez = 5mutez let b: tez = 10mutez // false let c: bool = (a = b) ``` -```reasonligo +```reasonligo group=d let a: tez = 5mutez; let b: tez = 10mutez; -/* false */ +(* false *) let c: bool = (a == b); ``` @@ -136,7 +136,7 @@ Conditional logic is an important part of every real world program. -```pascaligo +```pascaligo group=e const min_age: nat = 16n; (* @@ -162,7 +162,7 @@ function is_adult(const age: nat): bool is > ``` -```cameligo +```cameligo group=e let min_age: nat = 16n (** @@ -177,17 +177,17 @@ let is_adult (age: nat) : bool = if (age > min_age) then true else false ``` -```reasonligo +```reasonligo group=e let min_age: nat = 16n; -/** +(** This function is really obnoxious, but it showcases how the if statement and it's syntax can be used. Normally, you'd use `with (age > min_age)` instead. -*/ +*) let is_adult = (age: nat): bool => if (age > min_age) {