Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
24
Task/Permutations/ALGOL-68/permutations-2.alg
Normal file
24
Task/Permutations/ALGOL-68/permutations-2.alg
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/a68g --script #
|
||||
# -*- coding: utf-8 -*- #
|
||||
|
||||
CO REQUIRED BY "prelude_permutations.a68" CO
|
||||
MODE PERMDATA = INT;
|
||||
#PROVIDES:#
|
||||
# PERM*=INT* #
|
||||
# perm *=int list *#
|
||||
PR READ "prelude_permutations.a68" PR;
|
||||
|
||||
main:(
|
||||
FLEX[0]PERMDATA test case := (1, 22, 333, 44444);
|
||||
|
||||
INT upb data list = UPB test case;
|
||||
FORMAT
|
||||
data fmt := $g(0)$,
|
||||
data list fmt := $"("n(upb data list-1)(f(data fmt)", ")f(data fmt)")"$;
|
||||
|
||||
# FOR DATALIST permutation IN # perm gen permutations(test case#) DO (#,
|
||||
## (PERMDATALIST permutation)VOID:(
|
||||
printf((data list fmt, permutation, $l$))
|
||||
# OD #))
|
||||
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue