Skip to content

Commit 3d42da2

Browse files
committed
update
1 parent 1c82d8a commit 3d42da2

File tree

1 file changed

+38
-1
lines changed

1 file changed

+38
-1
lines changed

README.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,4 +178,41 @@ Arithmetic functions, like all functions in RoyalScript are nestable, you can ca
178178
1
179179
```
180180

181-
As demonstrated, any function, such as the *-()* can stretch across multiple lines if you so chose to do so.
181+
As demonstrated, any function, such as the *-()* can stretch across multiple lines if you so chose to do so.
182+
183+
##Logical Functions
184+
185+
RoyalScript defines a series of logical functions for comparing numbers, strings, and boolans. RoyalScript also provides functions to compare collections list lists or specific types like structs.
186+
187+
Unlike the arithmetic functions, some of these functions only take 2 and only 2 arguments, otherwise throwing an error.
188+
189+
###==(arg1, arg2)
190+
191+
The *==()* function checks if two arguments are of the same type and same value, except for lists or structs, which will not properly compare using this function.
192+
193+
```
194+
==(1, 1)
195+
true
196+
==(2, 1)
197+
false
198+
==(2, `2`)
199+
false
200+
==(2, +(2, 0))
201+
true
202+
```
203+
204+
###!=(arg1, arg2)
205+
206+
The *!=()* works exactly the same yet checks if two arguments are unequal to each other, or not the same type.
207+
208+
```
209+
!=(1, 1)
210+
false
211+
!=(3, 3, 3)
212+
Argument Error: Got improper arguments but expected 2.
213+
!=(false, true)
214+
true
215+
```
216+
###>(arg1, arg2)
217+
218+
###<(arg1, arg2)

0 commit comments

Comments
 (0)