www.digitalmars.com         C & C++   DMDScript  

D - Syntax Q:

reply Russell Lewis <spamhole-2001-07-16 deming-os.org> writes:
Which or both of these syntaxes are legal for declaring a varargs function?

	void foo(char a, ...) {;};
	void foo(char a...) {;};
Jan 21 2003
parent reply "Carlos" <carlos8294 msn.com> writes:
"Russell Lewis" <spamhole-2001-07-16 deming-os.org> escribió en el mensaje
news:3E2DA027.8070308 deming-os.org...
| Which or both of these syntaxes are legal for declaring a varargs
function?
|
| void foo(char a, ...) {;};
| void foo(char a...) {;};
|

the first

-------------------------
Carlos Santander
http://carlos3.netfirms.com/
"Russell Lewis" <spamhole-2001-07-16 deming-os.org> escribió en el mensaje
news:3E2DA027.8070308 deming-os.org...
| Which or both of these syntaxes are legal for declaring a varargs
function?
|
| void foo(char a, ...) {;};
| void foo(char a...) {;};
|

the first

-------------------------
Carlos Santander
http://carlos3.netfirms.com/
Jan 21 2003
parent reply Russell Lewis <spamhole-2001-07-16 deming-os.org> writes:
Carlos wrote:
 "Russell Lewis" <spamhole-2001-07-16 deming-os.org> escribió en el mensaje
 news:3E2DA027.8070308 deming-os.org...
 | Which or both of these syntaxes are legal for declaring a varargs
 function?
 |
 | void foo(char a, ...) {;};
 | void foo(char a...) {;};
 |
 
 the first
That was my thought, though I wanted Walter to confirm it. Also, if anybody has the latest version of DMD, can you check things: * Does DMD allow you to use the 2nd syntax? * Does the declaration of char[] fmt(char[] format, generic[] args...) in phobos/format.d still use the 2nd syntax? I have an old copy of phobos (the one I got when I installed DLI 0.1.2), and it has that.
Jan 21 2003
next sibling parent "Carlos" <carlos8294 msn.com> writes:
"Russell Lewis" <spamhole-2001-07-16 deming-os.org> escribió en el mensaje
news:3E2DA498.30209 deming-os.org...
| Carlos wrote:
| > "Russell Lewis" <spamhole-2001-07-16 deming-os.org> escribió en el
mensaje
| > news:3E2DA027.8070308 deming-os.org...
| > | Which or both of these syntaxes are legal for declaring a varargs
| > function?
| > |
| > | void foo(char a, ...) {;};
| > | void foo(char a...) {;};
| > |
| >
| > the first
|
| That was my thought, though I wanted Walter to confirm it.
|
| Also, if anybody has the latest version of DMD, can you check things:
|    * Does DMD allow you to use the 2nd syntax?

no, it doesn't

|    * Does the declaration of
|          char[] fmt(char[] format, generic[] args...)
|      in phobos/format.d still use the 2nd syntax?  I have an old copy of
| phobos (the one I got when I installed DLI 0.1.2), and it has that.
|

dli supports that, but dmd doesn't, AFAIR

-------------------------
Carlos Santander
http://carlos3.netfirms.com/


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.445 / Virus Database: 250 - Release Date: 2003-01-21
Jan 21 2003
prev sibling parent "Andrew Edwards" <aedwards spamfreeamerica.com> writes:
 Also, if anybody has the latest version of DMD, can you check things:
    * Does DMD allow you to use the 2nd syntax?
    * Does the declaration of
          char[] fmt(char[] format, generic[] args...)
      in phobos/format.d still use the 2nd syntax?  I have an old copy of
 phobos (the one I got when I installed DLI 0.1.2), and it has that.
No...It does not work.
Jan 21 2003