How do I cast to from byte[] <-> double for making a small assembler language VM to work?

Stefan Koch via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jul 18 05:08:36 PDT 2017


On Tuesday, 18 July 2017 at 11:06:22 UTC, Enjoys Math wrote:
> [ ... ]
> The cast at the bottom gives a compiler error (can't cast 
> byte[] to double).

If you want to see how it's done check:
https://github.com/UplinkCoder/dmd/blob/newCTFE_on_master/src/ddmd/ctfe/bc.d

Though if you have the choice I'd recommend proper 3-address 
opcodes.



More information about the Digitalmars-d-learn mailing list