Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,19 +0,0 @@
|
|||
with Ada.Text_IO; use Ada.Text_IO;
|
||||
with Ada.Containers.Indefinite_Ordered_Maps;
|
||||
|
||||
procedure Test_Iteration is
|
||||
package String_Maps is
|
||||
new Ada.Containers.Indefinite_Ordered_Maps (String, Integer);
|
||||
use String_Maps;
|
||||
A : Map;
|
||||
Index : Cursor;
|
||||
begin
|
||||
A.Insert ("hello", 1);
|
||||
A.Insert ("world", 2);
|
||||
A.Insert ("!", 3);
|
||||
Index := A.First;
|
||||
while Index /= No_Element loop
|
||||
Put_Line (Key (Index) & Integer'Image (Element (Index)));
|
||||
Index := Next (Index);
|
||||
end loop;
|
||||
end Test_Iteration;
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
var A = [ "H2O" => "water", "NaCl" => "salt", "O2" => "oxygen" ];
|
||||
|
||||
for k in A.domain do
|
||||
writeln("have key: ", k);
|
||||
|
||||
for v in A do
|
||||
writeln("have value: ", v);
|
||||
|
||||
for (k,v) in zip(A.domain, A) do
|
||||
writeln("have element: ", k, " -> ", v);
|
||||
|
|
@ -2,7 +2,7 @@ import system'collections;
|
|||
import system'routines;
|
||||
import extensions;
|
||||
|
||||
public program()
|
||||
public Program()
|
||||
{
|
||||
// 1. Create
|
||||
auto map := new Map<string,string>();
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
class Main {
|
||||
static public function main() {
|
||||
var map = [1 => "one", 2 => "two"];
|
||||
|
||||
// key and value
|
||||
for (key => value in map) {
|
||||
trace(key + " " + value);
|
||||
}
|
||||
|
||||
// keys only
|
||||
for (key in map.keys())
|
||||
trace(key);
|
||||
|
||||
// values only
|
||||
for (value in map)
|
||||
trace(value);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +1,13 @@
|
|||
local t = {
|
||||
["foo"] = "bar",
|
||||
["baz"] = 6,
|
||||
fortytwo = 7
|
||||
}
|
||||
local function f1(x) print(x) return x end
|
||||
|
||||
local t = { ["foo"] = "bar"
|
||||
, ["baz"] = 6
|
||||
, fortytwo = 7
|
||||
, [42] = { 1, 2, 3 }
|
||||
, [f1] = true
|
||||
, ["zz"] = f1
|
||||
}
|
||||
|
||||
for key,val in pairs(t) do
|
||||
print(string.format("%s: %s", key, val))
|
||||
print(string.format("%28s (%9s) -> (%9s) %s", key, type(key), type(val), val))
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
$h = @{ 'a' = 1; 'b' = 2; 'c' = 3 }
|
||||
|
|
@ -1 +0,0 @@
|
|||
$h.GetEnumerator() | ForEach-Object { Write-Host Key: $_.Name, Value: $_.Value }
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
foreach ($e in $h.GetEnumerator()) {
|
||||
Write-Host Key: $e.Name, Value: $e.Value
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
$h.Keys | ForEach-Object { Write-Host Key: $_ }
|
||||
|
||||
foreach ($k in $h.Keys) {
|
||||
Write-Host Key: $k
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
$h.Values | ForEach-Object { Write-Host Value: $_ }
|
||||
|
||||
foreach ($v in $h.Values) {
|
||||
Write-Host Value: $v
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
-- 8 Aug 2025
|
||||
include Settings
|
||||
-- 23 Aug 2025
|
||||
include Setting
|
||||
|
||||
say 'ASSOCIATIVE ARRAY: ITERATION'
|
||||
say version
|
||||
|
|
@ -39,7 +39,7 @@ do w = 1 to words(list)
|
|||
say 'The former capital of' stna.a '('a')' 'was' stca.a
|
||||
end
|
||||
say
|
||||
-- Loop through aux array...'
|
||||
-- Loop through array...'
|
||||
say 'Using an array...'
|
||||
do w = 1 to arra.0
|
||||
a=arra.w
|
||||
|
|
@ -47,10 +47,7 @@ do w = 1 to arra.0
|
|||
end
|
||||
say
|
||||
-- Show all vars
|
||||
say 'Variables...'
|
||||
if pos('Regina',version) > 0 then
|
||||
call Library
|
||||
call SysDumpVariables
|
||||
call DumpVariables
|
||||
exit
|
||||
|
||||
SetStateCap:
|
||||
|
|
@ -64,9 +61,4 @@ list=list code
|
|||
w=w+1; arra.w=code
|
||||
return
|
||||
|
||||
Library:
|
||||
call RxFuncAdd 'SysLoadFuncs','RegUtil','SysLoadFuncs'
|
||||
call SysLoadFuncs
|
||||
return
|
||||
|
||||
include Abend
|
||||
include Math
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
'instantiate the dictionary object
|
||||
Set dict = CreateObject("Scripting.Dictionary")
|
||||
|
||||
'populate the dictionary or hash table
|
||||
dict.Add 1,"larry"
|
||||
dict.Add 2,"curly"
|
||||
dict.Add 3,"moe"
|
||||
|
||||
'iterate key and value pairs
|
||||
For Each key In dict.Keys
|
||||
WScript.StdOut.WriteLine key & " - " & dict.Item(key)
|
||||
Next
|
||||
Loading…
Add table
Add a link
Reference in a new issue