### HB_ARRAYTOPARAMS() FUNCTION ### ========================================= Harbour has special function which allows to convert array into list of items which can be used as function parameters, array values or array indexes in the same way as '...' operator: hb_arrayToParams() -> [ 1 ] [, [ N ] ] i.e.: proc main( ... ) local aParams := hb_aParams(), n /* remove parameters starting with "--" */ n := 1 while n < len( aParams ) if left( aParams[ n ], 2 ) == "--" hb_adel( aParams, n, .t. ) else ++n endif enddo ? "Public parameters:", hb_arrayToParams( aParams ) return Note for Clipper users: 'hb_adel( aParams, n, .t. )' in above example works like 'adel( aParams, n ); asize( aParams, len( aParams ) - 1 )'. This functionality is unique to Harbour and xHarbour does not support hb_arrayToParams() or similar function.
This is the successor to Clipper... Clipper... Clipper, a popular & well-linked CA-Clipper website which I started in 1995 and which went offline in 2002
No comments:
Post a Comment