Common sorted list: Difference between revisions
Content added Content deleted
(Added solution for Action!) |
|||
Line 29: | Line 29: | ||
{{libheader|Action! Tool Kit}} |
{{libheader|Action! Tool Kit}} |
||
<lang Action!>INCLUDE "D2:SORT.ACT" ;from the Action! Tool Kit |
<lang Action!>INCLUDE "D2:SORT.ACT" ;from the Action! Tool Kit |
||
DEFINE PTR="CARD" |
|||
PROC PrintArray(BYTE ARRAY a BYTE len) |
PROC PrintArray(BYTE ARRAY a BYTE len) |
||
Line 55: | Line 57: | ||
RETURN (0) |
RETURN (0) |
||
PROC CommonListElements( |
PROC CommonListElements(PTR ARRAY arrays |
||
BYTE ARRAY lengths BYTE count |
BYTE ARRAY lengths BYTE count |
||
BYTE ARRAY res BYTE POINTER resLen) |
BYTE ARRAY res BYTE POINTER resLen) |
||
Line 85: | Line 87: | ||
RETURN |
RETURN |
||
PROC Test( |
PROC Test(PTR ARRAY arrays BYTE ARRAY lengths BYTE count) |
||
BYTE ARRAY res(100) |
BYTE ARRAY res(100) |
||
BYTE len,i |
BYTE len,i |
||
Line 100: | Line 102: | ||
PROC Main() |
PROC Main() |
||
PTR ARRAY arrays(3) |
|||
BYTE ARRAY |
BYTE ARRAY |
||
lengths(3)=[8 5 4], |
lengths(3)=[8 5 4], |