Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,13 +0,0 @@
|
|||
with Ada.Text_IO; use Ada.Text_IO;
|
||||
|
||||
procedure Array_Loop_Test is
|
||||
type Array_Index is range 1..3;
|
||||
A1 : array (Array_Index) of Character := "abc";
|
||||
A2 : array (Array_Index) of Character := "ABC";
|
||||
A3 : array (Array_Index) of Integer := (1, 2, 3);
|
||||
begin
|
||||
for Index in Array_Index'Range loop
|
||||
Put_Line (A1 (Index) & A2 (Index) & Integer'Image (A3
|
||||
(Index))(2));
|
||||
end loop;
|
||||
end Array_Loop_Test;
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
IDENTIFICATION DIVISION.
|
||||
PROGRAM-ID. Loop-Over-Multiple-Tables.
|
||||
|
||||
DATA DIVISION.
|
||||
WORKING-STORAGE SECTION.
|
||||
01 A VALUE "abc".
|
||||
03 A-Vals PIC X OCCURS 3 TIMES.
|
||||
|
||||
01 B VALUE "ABC".
|
||||
03 B-Vals PIC X OCCURS 3 TIMES.
|
||||
|
||||
01 C VALUE "123".
|
||||
03 C-Vals PIC 9 OCCURS 3 TIMES.
|
||||
|
||||
01 I PIC 9.
|
||||
|
||||
PROCEDURE DIVISION.
|
||||
PERFORM VARYING I FROM 1 BY 1 UNTIL 3 < I
|
||||
DISPLAY A-Vals (I) B-Vals (I) C-Vals (I)
|
||||
END-PERFORM
|
||||
|
||||
GOBACK
|
||||
.
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
var a1 = [ "a", "b", "c" ];
|
||||
var a2 = [ "A", "B", "C" ];
|
||||
var a3 = [ 1, 2, 3 ];
|
||||
|
||||
for (x,y,z) in zip(a1, a2, a3) do
|
||||
writeln(x,y,z);
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import system'routines;
|
||||
import extensions;
|
||||
|
||||
public program()
|
||||
public Program()
|
||||
{
|
||||
var a1 := new string[]{"a","b","c"};
|
||||
var a2 := new string[]{"A","B","C"};
|
||||
|
|
@ -9,8 +9,8 @@ public program()
|
|||
|
||||
for(int i := 0; i < a1.Length; i += 1)
|
||||
{
|
||||
console.printLine(a1[i], a2[i], a3[i])
|
||||
Console.printLine(a1[i], a2[i], a3[i])
|
||||
};
|
||||
|
||||
console.readChar()
|
||||
Console.readChar()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import system'routines.
|
||||
import extensions.
|
||||
|
||||
public program
|
||||
public Program
|
||||
{
|
||||
var a1 := new string[]{"a","b","c"};
|
||||
var a2 := new string[]{"A","B","C"};
|
||||
|
|
@ -10,7 +10,7 @@ public program
|
|||
.zipBy(a3, (first,second => first + second.toString() ));
|
||||
|
||||
zipped.forEach::(e)
|
||||
{ console.writeLine:e };
|
||||
{ Console.writeLine:e };
|
||||
|
||||
console.readChar();
|
||||
Console.readChar();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
sequence a, b, c
|
||||
|
||||
a = "abc"
|
||||
b = "ABC"
|
||||
c = "123"
|
||||
|
||||
for i = 1 to length(a) do
|
||||
puts(1, a[i] & b[i] & c[i] & "\n")
|
||||
end for
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
sequence a, b, c
|
||||
|
||||
a = "abc"
|
||||
b = "ABC"
|
||||
c = {1, 2, 3}
|
||||
|
||||
for i = 1 to length(a) do
|
||||
printf(1, "%s%s%g\n", {a[i], b[i], c[i]})
|
||||
end for
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
for i = 1 to length(a) do
|
||||
if (a[i] >= '0' and a[i] <= '9') then
|
||||
a[i] -= '0'
|
||||
end if
|
||||
if (b[i] >= '0' and b[i] <= '9') then
|
||||
b[i] -= '0'
|
||||
end if
|
||||
if (c[i] >= '0' and c[i] <= '9') then
|
||||
c[i] -= '0'
|
||||
end if
|
||||
printf(1, "%s%s%s\n", {a[i], b[i], c[i]})
|
||||
end for
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
using Lambda;
|
||||
using Std;
|
||||
|
||||
class Main
|
||||
{
|
||||
|
||||
static function main()
|
||||
{
|
||||
var a = ['a', 'b', 'c'];
|
||||
var b = ['A', 'B', 'C'];
|
||||
var c = [1, 2, 3];
|
||||
|
||||
//Find smallest array
|
||||
var len = [a, b, c]
|
||||
.map(function(a) return a.length)
|
||||
.fold(Math.min, 0x0FFFFFFF)
|
||||
.int();
|
||||
|
||||
for (i in 0...len)
|
||||
Sys.println(a[i] + b[i] + c[i].string());
|
||||
}
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
sub zip (&@)
|
||||
{
|
||||
my $code = shift;
|
||||
my $min;
|
||||
$min = $min && $#$_ > $min ? $min : $#$_ for @_;
|
||||
|
||||
for my $i(0..$min){ $code->(map $_->[$i] ,@_) }
|
||||
}
|
||||
my @a1 = qw( a b c );
|
||||
my @a2 = qw( A B C );
|
||||
my @a3 = qw( 1 2 3 );
|
||||
|
||||
zip { print @_,"\n" }\(@a1, @a2, @a3);
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
function zip3 ($a1, $a2, $a3)
|
||||
{
|
||||
while ($a1)
|
||||
{
|
||||
$x, $a1 = $a1
|
||||
$y, $a2 = $a2
|
||||
$z, $a3 = $a3
|
||||
[Tuple]::Create($x, $y, $z)
|
||||
}
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
zip3 @('a','b','c') @('A','B','C') @(1,2,3)
|
||||
|
|
@ -1 +0,0 @@
|
|||
zip3 @('a','b','c') @('A','B','C') @(1,2,3) | ForEach-Object {$_.Item1 + $_.Item2 + $_.Item3}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
;; Define the three series
|
||||
list1: [a b c]
|
||||
list2: [A B C]
|
||||
list3: [1 2 3]
|
||||
|
||||
;; Iterate over them in parallel by index
|
||||
repeat i length? list1 [
|
||||
;; pick returns the i-th element
|
||||
print rejoin [list1/:i list2/:i list3/:i]
|
||||
]
|
||||
|
|
@ -1 +0,0 @@
|
|||
≡(⊂⊂) "abc" "ABC" "123"
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
' Loop over multiple arrays simultaneously - VBScript - 08/02/2021
|
||||
|
||||
a = Array("a","b","c")
|
||||
b = Array("A","B","C")
|
||||
c = Array(1,2,3)
|
||||
For i = LBound(a) To UBound(a)
|
||||
buf = buf & vbCrLf & a(i) & b(i) & c(i)
|
||||
Next
|
||||
WScript.Echo Mid(buf,3)
|
||||
Loading…
Add table
Add a link
Reference in a new issue