Е
Size: a a a
КП
КП
КП
test.d(4): Error: variable `a` cannot be read at compile time
test.d(5): while evaluating `pragma(msg, c + 10)`
Е
test.d(4): Error: variable `a` cannot be read at compile time
test.d(5): while evaluating `pragma(msg, c + 10)`
void main()
{
foreach(a; AliasSeq!("90", "120")) {
enum c = mixin(a);
pragma(msg, c + 10);
}
}
КП
import sorrel;
import std.stdio;
private struct WindowSomeBind{
int test;
static int a = 0;
void onCreate(WindowInternal* w)
@event!q{
callAll!"acceptNumFromBind"(me.test);
}
{
test = a++;
writeln("start bind (ogl example)");
}
}
private struct WindowExtra{
void onCreate(WindowInternal* w){
writeln("start user defined");
}
void acceptNumFromBind(int handle){
writeln("LOOK! ", handle);
}
}
void main(){
sorrel.window.init;
auto win = Window!(WindowSomeBind, WindowExtra)(800, 600);
EventLoop.start;
}
КП
КП
КП
КП
КП
e