Moving from C to D

Daniel Keep daniel.keep.lists at gmail.com
Wed Jan 28 04:12:09 PST 2009



BLS wrote:
> Daniel Keep wrote:
>> [snip]
>>
>> Also, I believe that PASCAL is the same as the Windows cc, so my guess
>> at the conversion would be:
>>
>> For D 1.x:
>>
>> extern(Windows) int mycnt ( SOCKET s, sockaddr* name, int namelen );
>>
>> For D 2.x:
>>
>> extern(Windows) int mycnt ( SOCKET s, const sockaddr* name, int
>> namelen );
>>
>> Note that you'd have to supply definitions of SOCKET and sockaddr.
>>
>>   -- Daniel
> 
> I am pretty sure that PASCAL means  __pascal
> 
> so the D1 translation is :
> extern (Pascal) int mycnt ( SOCKET s, sockaddr* name, int namelen );
> 
> See :http://www.digitalmars.com/d/1.0/htomodule.html  at the bottom
> 
> Bjoern

Aah yes; I didn't realise Pascal was defined; I thought it was limited
to C, D, Windows and System for D1, adding C++ for D2.

  -- Daniel


More information about the Digitalmars-d-learn mailing list