Re: .ptr and .value

2010-05-05 Thread Robert Clipsham
On 06/05/10 00:11, bearophile wrote: Robert Clipsham: .ptr is only available for arrays. And arr.ptr returns the pointer to the start of the memory that contains the array data. While&arr is the pointer to the struct that contains the pointer and the length. Thanks for adding this, I probab

Re: .ptr and .value

2010-05-05 Thread Robert Clipsham
On 05/05/10 23:58, strtr wrote: But wouldn't this (property sugar?) be nice? I don't like it, I can see why you would though :) int myInt = 6; int* ptrToMyInt = myInt.ptr; int myInt2 = ptrToMyInt.deref; // you probably didn't mean *myInt ;) I guess this is what I get for writing code quickl

Re: .ptr and .value

2010-05-05 Thread bearophile
Robert Clipsham: > .ptr is only available for arrays. And arr.ptr returns the pointer to the start of the memory that contains the array data. While &arr is the pointer to the struct that contains the pointer and the length. > As for .value and .deref, these won't be implemented, you'll > ha

Re: .ptr and .value

2010-05-05 Thread strtr
Robert Clipsham Wrote: > On 05/05/10 23:20, strtr wrote: > > I keep on expecting .ptr to work on all types. What keeps this from being > > the case? > > And how about having a .value(.deref) property for known pointers? > > > > I feel a lot less comfortable with using stars and ampersands, becaus

Re: .ptr and .value

2010-05-05 Thread Robert Clipsham
On 05/05/10 23:20, strtr wrote: I keep on expecting .ptr to work on all types. What keeps this from being the case? And how about having a .value(.deref) property for known pointers? I feel a lot less comfortable with using stars and ampersands, because I keep on forgetting which one does what

.ptr and .value

2010-05-05 Thread strtr
I keep on expecting .ptr to work on all types. What keeps this from being the case? And how about having a .value(.deref) property for known pointers? I feel a lot less comfortable with using stars and ampersands, because I keep on forgetting which one does what.

Re: Export values (enum, int, char[]...) for DLL

2010-05-05 Thread torhu
On 04.05.2010 21:46, Nrgyzer wrote: Hello everybody, I'm trying to create a (very) simple DLL by using D. Now I want export values - is there any way do this... Off the top of my head, I think it goes like this: To export from a DLL: export int i = 7; To export from a DLL, with C name mangl

Re: Export values (enum, int, char[]...) for DLL

2010-05-05 Thread Nrgyzer
Ary Borenszweig Wrote: > Nrgyzer wrote: > > Hello everybody, > > > > I'm trying to create a (very) simple DLL by using D. Now I want export > > values - is there any way do this... for example: > > > > Example: > > > > mydll.d: > > export int i; > > > > mydll2.d: > > export int i = 99; > > >

Re: Export values (enum, int, char[]...) for DLL

2010-05-05 Thread Ary Borenszweig
Nrgyzer wrote: Hello everybody, I'm trying to create a (very) simple DLL by using D. Now I want export values - is there any way do this... for example: Example: mydll.d: export int i; mydll2.d: export int i = 99; dll.d: // Copied from http://www.digitalmars.com/d/2.0/dll.html test.d: impo

anyone got OpenCV bindings by chance?

2010-05-05 Thread Trass3r
Would be really great.

Re: segfaults

2010-05-05 Thread Lars T. Kyllingstad
On Tue, 04 May 2010 15:22:52 -0500, Ellery Newcomer wrote: > On 05/04/2010 11:32 AM, Lars T. Kyllingstad wrote: >> >> Shouldn't 'term' and 'signaled' switch names? It looks to me like >> 'term' will be nonzero if the process receives any signal, while >> 'signaled' will be only be true if it is a