-
Notifications
You must be signed in to change notification settings - Fork 230
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'DanTGL/list_declarations_issue_2856' in…
…to merging_2975_comma_declares
- Loading branch information
Showing
5 changed files
with
150 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Tests comma-separated declarations of variables | ||
|
||
print "Testing with 'SET'". | ||
set a to 1, b to 2, c to "a". | ||
|
||
print " 1. The first variable has the correct value: " + (a = 1). | ||
print " 2. The second variable has the correct value: " + (b = 2). | ||
print " 3. The third variable has the correct value: " + (c = "a"). | ||
|
||
print "Testing with 'GLOBAL'". | ||
global d is 5, e to 2. | ||
|
||
print " 1. The first variable has the correct value: " + (d = 5). | ||
print " 2. The second variable has the correct value: " + (e = 2). | ||
|
||
print "Testing with 'DECLARE'". | ||
|
||
declare f is 12, g to 1. | ||
|
||
print " 1. The first variable has the correct value: " + (f = 12). | ||
print " 2. The second variable has the correct value: " + (g = 1). | ||
|
||
|
||
print "Testing with 'DECLARE GLOBAL'". | ||
|
||
declare h is 7, i to 15, j to 3. | ||
|
||
print " 1. The first variable has the correct value: " + (h = 7). | ||
print " 2. The second variable has the correct value: " + (i = 15). | ||
print " 3. The thrid variable has the correct value: " + (j = 3). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters