exponent operator/library function

Michael P. baseball.mjp at gmail.com
Mon Aug 4 14:46:47 PDT 2008


BCS Wrote:

> Reply to Michael P.,
> 
> > Quick question: What do you have to use to do something like, 10 to
> > the power of 3? Something in std.math, a built-in operator?
> > 
> > That's all.
> > 
> > -Michael P.
> > 
> 
> iirc its.math.pow(base,exp);
> 
> 

Unfortunately, those didn't work( because of type issues). So I made my own integer one. :)
Anyways, somewhat unrelated question: I have attached a file that includes a simple program that I've made for keeping the brain fit, with memory. I've also made one that let's you do simple addition. :D
Anyways, everything is compiling fine, but I get an ArrayOutOfBounds error on line 125 or something. 
Okay, it's function createArray, which is called by memoryTest. Line 114, 115.
The file is attached.
Does anyone know I'm getting these array errors?

-Michael P.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: memory.d
Type: application/octet-stream
Size: 4929 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20080804/f5471519/attachment.obj>


More information about the Digitalmars-d-learn mailing list