D - C to D page
- Vathix (29/29) Feb 13 2004 From http://www.digitalmars.com/d/ctod.html,
- J Anderson (5/6) Feb 13 2004 It would be nice if it mentioned conversion from C function pointers to
From http://www.digitalmars.com/d/ctod.html,
"Looping through an array" could include foreach.
"Creating an array of variable size" has this bad code:
int array[];
array[array.length++] = x;
"Setting struct member alignment" uses align incorrectly:
struct ABC
{
...
align 1 int x;
...
I saw someone not to long ago ask why their similar align usage didn't
work, he must have seen it from this.
"Struct initializations" for the D way says "Member initialization is
done explicitly", shouldn't it say "Member initialization can be done
explicitly"?
"Creating a new typedef'd type" for the D way has code:
typedef void *Handle;
void foo(void *);
void bar(Handle);
Handle h;
foo(h); // syntax error
bar(h); // ok
That is not actually an error due to implicit conversion to Handle's
underlying type, or is a bug.
--
Christopher E. Miller
www.dprogramming.com
irc.dprogramming.com #D
Feb 13 2004
Vathix wrote:From http://www.digitalmars.com/d/ctod.html,It would be nice if it mentioned conversion from C function pointers to D function pointers as well. -- -Anderson: http://badmama.com.au/~anderson/
Feb 13 2004








J Anderson <REMOVEanderson badmama.com.au>