Page 1 of 1
Triple Dot ( ...)
Posted: Tue Nov 26, 2013 3:23 am
by hmgchang
I found quiet a lot of tripple dot ( ...) at the samples. and no documentation about it.
like this one in myzip.prg.
-
PROCEDURE Main( ... )
LOCAL hZip, aDir, aFile, aWild, ;
cZipName, cPath, cFileName, cExt, cWild, cPassword, cComment, ;
tmp
LOCAL lUnicode
IF "--unicode" $ hb_CmdLine()
hb_cdpSelect( "UTF8EX" )
hb_SetTermCP( hb_cdpTerm() )
Set( _SET_OSCODEPAGE, hb_cdpOS() )
lUnicode := .T.
ELSE
lUnicode := .F.
ENDIF
aWild := { ... }
- its in the PROCEDURE Main( ... )
- and at aWild := { ... }
pls advise Masters... and tq
Re: Triple Dot ( ...)
Posted: Tue Nov 26, 2013 4:00 am
by CalScot
The three dots are known in English as an ellipsis, for which the dictionary says:
ellipsis is the omission of one or more words, which must be supplied by the reader.
In your example
- its in the PROCEDURE Main( ... )
- and at aWild := { ... }
It means that you should provide the code for the procedure Main() and the elements for the aWild array in the example -- that the documentation will not provide it, assuming that you will be able to fill in your own processes/data in these places.
Regards,
CalScot
Re: Triple Dot ( ...)
Posted: Tue Nov 26, 2013 10:47 am
by gfilatov
hmgchang wrote:I found quiet a lot of tripple dot ( ...) at the samples. and no documentation about it.
- its in the PROCEDURE Main( ... )
- and at aWild := { ... }
pls advise Masters... and tq
Hi,
It is Harbour language enhancement: variable number of parameters.
... at end of param list e.g. FUNCTION MyFunc(cArg1, nArg2, ...)
may be used elsewhere e.g. { ... } array of params
SYNTAX for variable number of parameters
1) [FUNCTION|PROCEDURE] name( ... )
or
2) [FUNCTION|PROCEDURE] name( var1, var2, varN, ... )
To access passed parameters use the following:
PCOUNT() - returns number of passed parameters
HB_PVALUE( iParamNum ) - returns <iParamNum> parameter
HB_APARAMS() - returns array with all passed parameters
or usual name of parameter variable in case of syntax 2)
Hope that useful.

Re: Triple Dot ( ...)
Posted: Tue Nov 26, 2013 11:08 am
by danielmaximiliano
Como siempre Grigory una fuente de conocimiento
As always a source of knowledge Grigory
Re: Triple Dot ( ...)
Posted: Tue Nov 26, 2013 11:33 am
by esgici
Thanks Scotty and Grigory
Viva HMG

Re: Triple Dot ( ...)
Posted: Tue Nov 26, 2013 11:46 am
by bpd2000
esgici wrote:Thanks Scotty and Grigory
Viva HMG

+1
Valuable info
Re: Triple Dot ( ...)
Posted: Thu Nov 28, 2013 2:53 am
by hmgchang
Thks Masters,
( CalScot, gfilatov, danielmaximiliano, esgici / i like your pic and bpd2000)
I misunderstood the programs since its under the test folder,
now I know I hv to provide in place of the ...