Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
16
Task/Array-concatenation/Ursa/array-concatenation.ursa
Normal file
16
Task/Array-concatenation/Ursa/array-concatenation.ursa
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# create two streams (the ursa equivalent of arrays)
|
||||
# a contains the numbers 1-10, b contains 11-20
|
||||
decl int<> a b
|
||||
decl int i
|
||||
for (set i 1) (< i 11) (inc i)
|
||||
append i a
|
||||
end for
|
||||
for (set i 11) (< i 21) (inc i)
|
||||
append i b
|
||||
end for
|
||||
|
||||
# append the values in b to a
|
||||
append b a
|
||||
|
||||
# output a to the console
|
||||
out a endl console
|
||||
Loading…
Add table
Add a link
Reference in a new issue