Something wrong with std.math.pow?
Simen Kjaeraas
simen.kjaras at gmail.com
Thu Sep 27 23:03:36 PDT 2012
On 2012-47-28 0709, Tim <Lt.Infiltrator at gmail.com> wrote:
>> import std.conv;
>> import std.math;
>>
>> void main() {
>> pragma(msg, "Number of bits: " ~ to!string(12 * 4));
>> pragma(msg, "Addressable Bytes: " ~ to!string(pow(2, 12 * 4)));
>> }
>>
>> Number of bits: 48
>> Addressable Bytes: 0
>
> From what I understand, pragma(msg, ...) prints at compile time. I
> don't think that it evaluates functions then.
Yes it does.
--
Simen
More information about the Digitalmars-d-learn
mailing list