> [mailto:[EMAIL PROTECTED] On Behalf Of Oleg Kobchenko
> 
> This is a good point. It is address under HTTP Parameters in
>   http://www.jsoftware.com/jwiki/CGI/Design
> 
> In other words, the "qparam key" will return the first value, 
> where as a number of additional accessors will take care of 
> arrays of grouped parameters: qparamList key - for same 
> names; qparamPrefix prefix - for cluster of parameters with 
> the same prefix (good for representing isolated entities on 
> the same page, like DB records, paging/sorting, etc.)

Would these definitions work for qparamList & qparamPrefix?
Not sure if the type coercion makes much sense for qparamPrefix though.

qparamList=: ''&$: : (4 : 0)
  if. 0 > i=. (~.qkeys'') ndx_1 boxopen y do. x return. end.
  (boxopen x) coerce each i{:: CGIKEYS</.CGIVALS
)

qparamPrefix=: ''&$: : (4 : 0)
  prefs=. (#y){. each qkeys''
  if. 0 > i=. (~.prefs) ndx_1 boxopen y do. x return. end.
  (boxopen x) coerce each i{:: prefs</.CGIKEYS,.CGIVALS
)

Also according to the API there should be a verb 'qparamKeys'. I'm
thinking this is the same as 'qkeys' so should there be an entry as
follows? 

qparamKeys=: qkeys

'qkeys' could be renamed but that would break current implementations
and qkeys is nice & short for use in other verbs.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to