Creating A D DLL For Use By VB

Rory Starkweather Rory_member at pathlink.com
Mon Mar 20 18:28:53 PST 2006


It comes back pretty quickly when you have a starting point.

// uppercase.d
import std.string;      // For uppercase
import std.c.stdio;     // For printf

int main(char[][] Args)
{
char cChar;         // Declare a variable (cChar) of type char

if (Args.length > 1)
{
printf("Received %d args.\n", Args);
}

//uppercase returns the xth letter of the 26, capitalized.
cChar = uppercase[12];   
// Remember to use %c for char values.
// If you use %s for string, you get an access error.
// This should return 'M'
printf ("I'm hoping this will print a letter: %c\n", cChar);
return 0;
}





More information about the Digitalmars-d-learn mailing list