Mon, 8 Dec 2008 06:59:40 + (UTC), BCS wrote:
> Reply to Bill,
>
>> On Mon, Dec 8, 2008 at 2:57 PM, BCS <[EMAIL PROTECTED]> wrote:
>>
>>> Reply to Michael P.,
>>>
>>> rand() & TYPES_OF_TILES
>>>
>>> never use rand like that (the low order bit on many rands toggles
>>> every
>>> single time)
Hello d folk,
I have a question about D 1.0 inline asm. Has anyone an idea how to get
the offset of a label without using "call Label1", then "pop eax".
Actually there would be an offsetof but it seems not to work.
In other (inline) assemblers I'd just use offset or addr, but it seems
that my Win
BCS Wrote:
> Reply to John,
>
> > Hello!
> >
> > I'm wanting to use D to send a PDF to a printer. Is there an easy way
> > to do this? Also, I may need to set which tray to go to and whether it
> > should duplex or not.
> >
> > Could someone help me out?
> >
> > THANKS!
> >
>
> You would do
Reply to Sergey,
Mon, 8 Dec 2008 06:59:40 + (UTC), BCS wrote:
better (I think):
rand() / (RAND_MAX / TYPES_OF_TILES)
Don't use rand() like this, ever. ;) "RAND_MAX / TYPES_OF_TILES" is
an integer expression, it rounds down, therefore your formula gives a
slightly greater range of
poly Wrote:
> I have a question about D 1.0 inline asm. Has anyone an idea how to get
> the offset of a label without using "call Label1", then "pop eax".
> Actually there would be an offsetof but it seems not to work.
mov eax, Label1
Michael P. Wrote:
> I meant array bounds error, not array bounds array. :P
http://www.digitalmars.com/d/2.0/arrays.html
learn prefix and postfix syntax.
Kagamin schrieb:
> poly Wrote:
>
>> I have a question about D 1.0 inline asm. Has anyone an idea how to get
>> the offset of a label without using "call Label1", then "pop eax".
>> Actually there would be an offsetof but it seems not to work.
>
> mov eax, Label1
Hi Kagamin,
I've just tried this
A couple of questions:
1: Even though D has an automatic garbage collector, is one still
allowed to free the memory of a malloced array manually (using free
() ), to avoid pauses in the program?
2: One justification on the website for using automatic garbage
collection is how "allocated memory wi
Reply to Dan,
A couple of questions:
1: Even though D has an automatic garbage collector, is one still
allowed to free the memory of a malloced array manually (using free ()
), to avoid pauses in the program?
Yes, in fact if you malloc memory you MUST free it. Only stuff like dynamic
arrays
Hello all,
I began learning D a few months ago, and now I have a question about
cyclic dependencies (and some random whining).
I come from a java background and have had no serious exposure to C++.
In java, cyclic dependencies are legit to the best of my knowledge. I
don't know about C++, th
Michael P. Wrote:
> Okay, I'm getting an array bounds error, and I have no clue why. Here is the
> code that affect it:
>
> //Constants
> const int SCREEN_WIDTH = 640;
> const int SCREEN_HEIGHT = 480;
> const int TILE_WIDTH = 20;
> const int TILE_HEIGHT = 20; //how big one tile is, in pixels
> c
Ellery Newcomer Wrote:
> Hello all,
>
> I began learning D a few months ago, and now I have a question about
> cyclic dependencies (and some random whining).
>
> I come from a java background and have had no serious exposure to C++.
> In java, cyclic dependencies are legit to the best of my kn
12 matches
Mail list logo