Eildert,

>>     for (irec = 0; irec < totrec; irec++) {
>>        for (i = 0; i < nsnp; i++) {
>>            key=something;
>>           JSLI(PValue, PJArray[i], key);
>>        }
>>      }

> My problem is that I have no idea how to write this.  If nsnp were two
> I would just have two separate Judy arrays, say PJarray1 and PJarray2.
> Maybe you could just give me the few lines of how this is written for
> nsnp arrays?

Well what's wrong with the snippet above?  Does the compiler not like
it?  Except I would rename "PJArray" to maybe "APJArray" or something to
indicate it's a meta-structure.  -- I always put more thought into
object naming, after being exposed to "visiual type checking."  Even the
default name "PJArray" is just a placeholder and not a good example.  If
you are actually holding Widgets in your JudyL array, then an object
like this I might name WidgetPa[] or something like that.  Then it's
clearer when you say "foo = *WidgetPa[4]" or whatever, although in your
case you'd call JudyLGet() or something instead of "*".

I've been retired 2+ years and my skills are getting rusty, but couldn't
this work for a fixed-size array of Judy array pointers?

    Pvoid_t APJLArray[10];

Although you must remember to initialize them to NULL if needed.

Cheers,
Alan

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Judy-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/judy-devel

Reply via email to