www.digitalmars.com         C & C++   DMDScript  

D - main(dchar [][] )?

reply "Carlos Santander B." <carlos8294 msn.com> writes:
I don't have experience using non-ascii strings, but I thought I could bring
this up: C and C++ allow to define int wmain(int,wchar_t**). Is there a way
to do the same in D? I tried to define main as int main(dchar[][]) but the
compiler complained. In any case is that desirable/needed/wanted at all?

-----------------------
Carlos Santander Bernal
Jan 14 2004
next sibling parent Lewis <dethbomb hotmail.com> writes:
Carlos Santander B. wrote:

 I don't have experience using non-ascii strings, but I thought I could bring
 this up: C and C++ allow to define int wmain(int,wchar_t**). Is there a way
 to do the same in D? I tried to define main as int main(dchar[][]) but the
 compiler complained. In any case is that desirable/needed/wanted at all?
 
 -----------------------
 Carlos Santander Bernal
 
 
im assuming that they're just a pointer or references to a memory so you should be able to define a pointer to anything really, as long as the structure and the byte length of the argument list is the same. winmain(int,wchar*) or winmain(int,char*) or winmain(int,dchar*) not sure if thats correct syntax but they should all have the same value of a pointer variable if done right Hope it helps... Lewis
Jan 15 2004
prev sibling parent reply "Walter" <walter digitalmars.com> writes:
"Carlos Santander B." <carlos8294 msn.com> wrote in message
news:bu4eg5$2epp$1 digitaldaemon.com...
 I don't have experience using non-ascii strings, but I thought I could
bring
 this up: C and C++ allow to define int wmain(int,wchar_t**). Is there a
way
 to do the same in D? I tried to define main as int main(dchar[][]) but the
 compiler complained. In any case is that desirable/needed/wanted at all?
At the moment, there is no way to do it in D. It'll eventually have to be added, though.
Jan 15 2004
parent reply Dr.Dizel <Dr.Dizel_member pathlink.com> writes:
Hm... idea:

int main(char[][] args, char[char[]] envs) {;}

:-D

Walter?
Jan 17 2004
parent "Walter" <walter digitalmars.com> writes:
"Dr.Dizel" <Dr.Dizel_member pathlink.com> wrote in message
news:bub8vf$1nud$1 digitaldaemon.com...
 Hm... idea:

 int main(char[][] args, char[char[]] envs) {;}

 :-D

 Walter?
Probably have to do that too <g>.
Jan 17 2004