Hi,

Przemysław Czerpak wrote:
RETURN &("@" + cFunc + "()"):exec(...)

   RETURN &cFunc( ... )
is much simpler :)

I was sure, that it should be more simple way than proposed by me. I (almost) never use macro, and do not know its syntax...


Filter hash could be used instead of filter function also:
{"STR"=>@STR(), "VAL"=>@MY_VAL(), "MEMOREAD"=>@HB_MEMOREAD(),
"IDLE"=>{|| NIL}}. It is less flexible solution than filter
function, but can solve problem of NETIO_PROCEXIST().

I do not think it's less flexible. It allow to create quite
interesting RPC servers, i.e. some custom set of commands:

   { { "Code:1" => { |...|
                     local hResult:={=>}
                     goTop()
                     while !eof()
                        hResult[ field->articule ] += field->quantity
                        dbskip()
                     enddo
                     return hResult
                   } }, ;
     { "Code:2" => { |...|
     [...]
   }

I'm not sure if it's intentional, but you've used array of hashes instead of plain hash here... If you find this method not less flexible, I think we should use this method to define rpc filter. It look more clear (no lRaw, lCheck is required) and faster than single rpc filter function containing IF lCheck branching and macro evaluation. It also uses the same technique as __AXREGISTERHANDLER() hash. Usage of {"func"=>@func(),...} also solves a problem of function REQUEST. &cFunc() requires REQUESTs on server side to force linkage of required functions.


Regards,
Mindaugas
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to