Hash join: Difference between revisions

No edit summary
Line 1,742:
Def Name$, Nemesis$
Def Long m, mc, items_size, A
\\ Lets make a container which use keys with hash function
Inventory A
\\ A now is a pointer to an Inventory, with Len(A)=0
\\ Print Type$(A)="Inventory"
\\ empty stack. We use current stack to place data
Flush
Line 1,770:
data 18, "Popeye"
data 28, "Alan"
\\ This is the JOIN PHASE
items_size=stack.size/2
\\ using items_size we can append data (using data) to stack
Line 1,778:
\\ Letters justify to left, numbers to right.
\\ Letters can use more columns, and maybe wrap to more lines.
Print $(0), "Output during join"
Print "A.Age", "A.Name","B.Character", "B.Nemesis"
Line 1,799:
items_size--
}
\\ split rem line after : to use second way
rem : goto secondway
Print $(0), "Output after join"
Print "A.Age", "A.Name","B.Character", "B.Nemesis"
Line 1,804 ⟶ 1,806:
Print $(1), Number, Letter$, Letter$, Letter$
}
Exit
secondway:
Print $(0), "Output after join using format$()"
Print Format$("{0:5} {1:10} {2:10} {3:20}","A.Age", "A.Name","B.Character", "B.Nemesis")
Line 1,823 ⟶ 1,827:
 
</pre >
 
=={{header|Mathematica}} / {{header|Wolfram Language}}==
 
Anonymous user