www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - DMD 1.020 release

reply Walter Bright <newshound1 digitalmars.com> writes:
   extern (System)

should work now.

http://www.digitalmars.com/d/1.0/changelog.html
http://ftp.digitalmars.com/dmd.1.020.zip
Jul 23 2007
parent reply "Stewart Gordon" <smjg_1998 yahoo.com> writes:
"Walter Bright" <newshound1 digitalmars.com> wrote in message 
news:f83il1$1b57$1 digitalmars.com...
   extern (System)

 should work now.

 http://www.digitalmars.com/d/1.0/changelog.html
 http://ftp.digitalmars.com/dmd.1.020.zip

What is the practical use of extern (System)? Stewart.
Jul 26 2007
parent reply Frits van Bommel <fvbommel REMwOVExCAPSs.nl> writes:
Stewart Gordon wrote:
 "Walter Bright" <newshound1 digitalmars.com> wrote in message 
 news:f83il1$1b57$1 digitalmars.com...
   extern (System)

 should work now.

 http://www.digitalmars.com/d/1.0/changelog.html
 http://ftp.digitalmars.com/dmd.1.020.zip

What is the practical use of extern (System)?

Some libraries have the same interface (functions) on different operating systems, but with a different calling convention. (Typically extern(Windows) on Windows and extern(C) elsewhere) This used to be handled by putting --- version(Windows) { extern(Windows): } else { extern(C): } --- at the top of the interface module but apparently the fact that that worked was due to a bug, and it was fixed...
Jul 26 2007
parent Sean Kelly <sean f4.ca> writes:
Frits van Bommel wrote:
 Stewart Gordon wrote:
 What is the practical use of extern (System)?

Some libraries have the same interface (functions) on different operating systems, but with a different calling convention.

The ODBC API is one such. Sean
Jul 26 2007