[Cook] table lookup
Peter Miller
millerp at canb.auug.org.au
Tue Jun 10 16:05:07 EST 2003
On Fri, 2003-06-06 at 04:59, Aryeh M. Friedman wrote:
>
> If I have a table that is something like this:
>
> Col 1 Col 2
> -----------------------------
> C .c
> C++ .cpp
> Java .j
> Yacc .y
> etc.
>
> Can I do a direct lookup up without writing a function to do it?
table-C = ".c"
table-C++ = ".cpp"
table-Java = ".j"
table-Yacc = ".y"
value = [table-[index]]
or you may need to cope with non-existant indexes
#include functions
value = [defined-or-null table-[index]]
--
Regards
Peter Miller <millerp at canb.auug.org.au>
/\/\* http://www.canb.auug.org.au/~millerp/
PGP public key ID: 1024D/D0EDB64D
fingerprint = AD0A C5DF C426 4F03 5D53 2BDB 18D8 A4E2 D0ED B64D
See http://www.keyserver.net or any PGP keyserver for public key.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: This is a digitally signed message part
URL: <http://lists.auug.org.au/pipermail/cook-users/attachments/20030610/f48767a5/attachment.pgp>
More information about the Cook-users
mailing list