funny behaviour

hrk l8atnight at gmail.com
Sun Aug 3 13:51:21 PDT 2008


sure  - thanks for trying
file 4



Koroskin Denis Wrote:

> On Sun, 03 Aug 2008 22:11:49 +0400, hrk <l8atnight at gmail.com> wrote:
> 
> > hi all,
> >
> > just don’t know what’s happening anymore. Could anybody help?
> > I do have an array,
> >
> > const double const_dscales[19] = [
> > 		  1.0,1.0E1, 1.0E2, 1.0E3, 1.0E4, 1.0E5,
> > 		  1.0E6, 1.0E7, 1.0E8, 1.0E9, 1.0E10, 1.0E11,
> > 		  1.0E12, 1.0E13, 1.0E14, 1.0E15, 1.0E16, 1.0E17,
> > 		  1.0E18 ];
> >
> > whichis imported by various modules. When i call it from main declared  
> > in main such as
> >
> > double divisor = const_dscales (2);
> >
> 
> That's an incorrect syntax. You should use const_dscales[2] instead.
> 
> > it works. If it is called the same way in a method of some class it  
> > returns inf. I tried to rename, but that will not make a difference.
> > I made a function of it
> >
> > double scaler(double sc) {return std.c.math.pow(10.0, sc);}
> >
> > and had it as a private / public method in a class and the same thing  
> > happened. I can’t get it to work in class, be it private or public.  
> > Please enlighten me.
> >
> 
> Could you show a code sample so that we could compile and test it, please?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: firebird_events.d
Type: text/x-dsrc
Size: 8816 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20080803/bed62c19/attachment-0001.d>


More information about the Digitalmars-d-learn mailing list