Jeff Abrahamson on 5 Aug 2004 13:11:22 -0000 |
On Thu, Aug 05, 2004 at 08:34:30AM -0400, Phil Lawrence wrote: > [20 lines, 79 words, 531 characters] Top characters: eotisl\nr > > For the more formally educated on the list: :-) > > Is there any special name for this way of storing name=>value pairs? > @ary = > ( > $delimited_ordered_list_of_keys > , $val_1 > , ... > , $val_n > ); > > Basically, I'm doing this in a PL/SQL function, and need to come up with > a pithy function name. Actually, a germane name would be best, but I'll > settle for pithy. Gosh, I haven't seen that in years, and never not In Fortran. ;-) So you have an array whose first member is a string representing an array of keys and whose remaining members are the values associated with those keys? You probably know that this is an error-prone structure (it can get out of sync), that it would normally be more readable and less buggy to use an array of key-value pairs. You'd then have a function that writes it out as whatever sort of sql you need as you need it. But, assuming you know that and there's some pressing need to do the above, the answer to your question is that I don't know a name for such a structure. The Fortran reference, to be pedantic: Fortran likes to do things like creating arrays of points like this (C-ish notation): float x-coords[]; float y-coords[]; float z-coords[]; where C would say (C-ish notation) struct point { float x; float y; float z; }[]; the latter having much better cache performance and being less likely to confuse the x-coord of one point with the (say) z-coord of another. -- Jeff Jeff Abrahamson <http://www.purple.com/jeff/> 215/837-2287 GPG fingerprint: 1A1A BA95 D082 A558 A276 63C6 16BF 8C4C 0D1D AE4B A cool book of games, highly worth checking out: http://www.amazon.com/exec/obidos/ASIN/1931686963/purple-20 Attachment:
signature.asc
|
|