Hi Jorgen,
Try and switch to gcc compiler in favor of Storm V3.
I've tried your little example with the gcc compiler: it works! But when switching to Storm C3 all I get is an error in line 12: Illegal argument: CloseLibrary(IntuitionBase); This one is to be resolved like this: CloseLibrary(Library *)IntuitionBase); Under Storm C3 it compiles and yes your screen flashes! On the other hand flashing the screen to draw a user's attention is a bad, bad practice. There are far more userfriendly ways to communicate with the user when it comes to drawing attention.
Keep going on! Working from simple programs onwards is the best way of teaching yourselves how to program and don't forget 'borrowing' code from someone else. It may come in very, very handy at times...
Cheers mate. Oh, ehm, one more remark, but admittedly very personel is the style of writing. Personally I prefer to do it this way:
int main(void)
{ if (IntuitionBase = OpenLibary("intuition.library", 33L))
....{DisplayBeep(0L);
....}
..else
....{exit(20);
....}
}
It makes it far more readable and therefore easier to maintain. I've gone sofar as to indenting every next level by only two positions, while 4 is considered default. But as I said it is just a matter of personal taste.
Regards,
Tjitte
P.S. Indentation is not shown correctly, as blanks at the beginning of a line are removed. Therefore I've replaced them with dots.