From 839259cdd7e07630cb131f87476c43d28ad65d72 Mon Sep 17 00:00:00 2001 From: Max Wash Date: Sun, 10 Nov 2024 12:22:54 +0000 Subject: [PATCH] doc: add and, or, not, is, is not operators --- doc/sample/Person.im | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/doc/sample/Person.im b/doc/sample/Person.im index bca9cb8..6b27d14 100755 --- a/doc/sample/Person.im +++ b/doc/sample/Person.im @@ -409,8 +409,11 @@ cout put:'Hello, world!' unless x <= 10. execution. - unary operators - - boolean NOT (!) + - boolean NOT (not) - bitwise NOT (~) + - binary operators + - Type check operator (is, is not) + - Protocol check operator (understands) - unary messages, complex messages - binary operators - multiplication (*) @@ -423,8 +426,8 @@ cout put:'Hello, world!' unless x <= 10. - bitwise AND (&) - bitwise XOR (^) - bitwise OR (|) - - boolean AND (&&) - - boolean OR (||) + - boolean AND (and) + - boolean OR (or) - cascade (;) - inline if-else - keyword messages @@ -538,6 +541,12 @@ p1 = do x end. + +v = 'Hello'. +if v is String then + cout put:'v is a string!' +end + /******************************************************************************/ /**