On Fri, Jan 12, 2018 at 08:46:50PM +, WhatMeWorry via Digitalmars-d-learn
wrote:
[...]
> I hate to keep being a bother, but my project with the below static
> this() now compiles fine, but aborts during runtime with a "a problem
> caused the program to stop working ..."
Is there a way to get
On Thursday, 11 January 2018 at 23:29:30 UTC, Adam D. Ruppe wrote:
On Thursday, 11 January 2018 at 23:20:44 UTC, WhatMeWorry wrote:
When I simply move the array out of main() but still in app.d,
the compiler returns
Error: expression ["SCRATCH":Track("scratch.wav",
cast(Sound)1, 0, null),...
On Thursday, 11 January 2018 at 23:20:44 UTC, WhatMeWorry wrote:
When I simply move the array out of main() but still in app.d,
the compiler returns
Error: expression ["SCRATCH":Track("scratch.wav", cast(Sound)1,
0, null),... is not a constant.
Can I use "static if" or "static this()", or
I've built a sound.d module with lots data types, free functions
(initAndOpenSound() loadSound()), and enums etc.
In my main/app.d module, I've created the the following
associative array:
void main(string[] argv)
{
initAndOpenSound();
Track[string] tracks =
[
"SCRATCH"