Skip to content

Commit 64a3870

Browse files
committed
Added comma operator example
1 parent a644191 commit 64a3870

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

squirrel/comma_operator.nut

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
local a, b, x
2+
x = a = 5, b = 9, a * a + b * b
3+
4+
print(a + "\n")
5+
print(b + "\n")
6+
print(x + "\n")

squirrel/test.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ sq "$PSScriptRoot\clockhands_time.nut" |
1818
sq "$PSScriptRoot\clockhands.nut" |
1919
Compare-Object (Get-Content "$PSScriptRoot\..\test\clockhands_expected") |
2020
Assert-MatchTests &&
21+
sq "$PSScriptRoot\comma_operator.nut" &&
2122
sq "$PSScriptRoot\debug_keywords.nut" &&
2223
sq "$PSScriptRoot\floating_point_mystery.nut" &&
2324
sq "$PSScriptRoot\hello.nut" &&

0 commit comments

Comments
 (0)