Data update
This commit is contained in:
parent
72eb4943cb
commit
4d5544505c
2347 changed files with 62432 additions and 16731 deletions
12
Task/Loops-Continue/Ballerina/loops-continue.ballerina
Normal file
12
Task/Loops-Continue/Ballerina/loops-continue.ballerina
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import ballerina/io;
|
||||
|
||||
public function main() {
|
||||
foreach int i in 1...10 {
|
||||
io:print(i);
|
||||
if i % 5 == 0 {
|
||||
io:println();
|
||||
continue;
|
||||
}
|
||||
io:print(", ");
|
||||
}
|
||||
}
|
||||
31
Task/Loops-Continue/Uxntal/loops-continue.uxnatl
Normal file
31
Task/Loops-Continue/Uxntal/loops-continue.uxnatl
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
%newline { [ LIT2 0a -Console/write ] DEO }
|
||||
%comma { [ LIT2 ", -Console/write ] DEO }
|
||||
%space { [ LIT2 20 -Console/write ] DEO }
|
||||
%MOD ( a b -- a%b ) { DIVk MUL SUB }
|
||||
|
||||
|18 @Console/write
|
||||
|
||||
|100
|
||||
|
||||
#0b01
|
||||
&loop
|
||||
DUP print-dec
|
||||
DUP #05 MOD ?{
|
||||
newline !&continue }
|
||||
comma space
|
||||
&continue
|
||||
INC GTHk ?&loop
|
||||
POP2
|
||||
BRK
|
||||
|
||||
@print-dec ( dec -- )
|
||||
DUP #64 DIV print-num/try
|
||||
DUP #0a DIV print-num/try
|
||||
( >> )
|
||||
|
||||
@print-num ( num -- )
|
||||
#0a DIVk MUL SUB [ LIT "0 ] ADD .Console/write DEO
|
||||
JMP2r
|
||||
&try ( num -- )
|
||||
DUP ?print-num
|
||||
POP JMP2r
|
||||
Loading…
Add table
Add a link
Reference in a new issue