Triple Dot ( ...)

Issues and Discussions related to Harbour

Moderator: Rathinagiri

Post Reply
User avatar
hmgchang
Posts: 273
Joined: Tue Aug 13, 2013 4:46 am
Location: Indonesia

Triple Dot ( ...)

Post 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
Just Hmg It !
User avatar
CalScot
Posts: 303
Joined: Thu Mar 21, 2013 12:22 am
Location: California

Re: Triple Dot ( ...)

Post 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
User avatar
gfilatov
Posts: 1060
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Re: Triple Dot ( ...)

Post 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. :idea:
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein
User avatar
danielmaximiliano
Posts: 2611
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: Triple Dot ( ...)

Post by danielmaximiliano »

Como siempre Grigory una fuente de conocimiento

As always a source of knowledge Grigory
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Triple Dot ( ...)

Post by esgici »

Thanks Scotty and Grigory :)

Viva HMG :D
Viva INTERNATIONAL HMG :D
User avatar
bpd2000
Posts: 1207
Joined: Sat Sep 10, 2011 4:07 am
Location: India

Re: Triple Dot ( ...)

Post by bpd2000 »

esgici wrote:Thanks Scotty and Grigory :)

Viva HMG :D
+1
Valuable info
BPD
Convert Dream into Reality through HMG
User avatar
hmgchang
Posts: 273
Joined: Tue Aug 13, 2013 4:46 am
Location: Indonesia

Re: Triple Dot ( ...)

Post 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 ...
Just Hmg It !
Post Reply