Simple database: Difference between revisions
Content added Content deleted
(→{{header|C}}: As I wrote, previous version does not compile. Now all works fine.) |
(rebol) |
||
Line 2,477: | Line 2,477: | ||
[cds] Some-CD; 2013-01-03 |
[cds] Some-CD; 2013-01-03 |
||
</pre> |
</pre> |
||
=={{header|Rebol}}== |
|||
rebol [author: "Nick Antonaccio"] |
|||
write/append %rdb "" db: load %rdb |
|||
switch system/options/args/1 [ |
|||
"new" [write/append %rdb rejoin [now " " mold/only next system/options/args newline]] |
|||
"latest" [print copy/part tail sort/skip db 4 -4] |
|||
"latestcat" [ |
|||
foreach cat unique extract at db 3 4 [ |
|||
t: copy [] |
|||
foreach [a b c d] db [if c = cat [append t reduce [a b c d]]] |
|||
print copy/part tail sort/skip t 4 -4 |
|||
] |
|||
] |
|||
"sort" [probe sort/skip db 4] |
|||
] |
|||
halt |
|||
=={{header|Ruby}}== |
=={{header|Ruby}}== |