Topic : Is this a bug?

Forum : ST7/STM8

Original Post
Post Information Post
April 21, 2010 - 9:11am
Guest

More weird code from a student. The program has a delay function, declared as

void delay1ms( unsigned short u16delay);

and called when required using something like

delay1ms(50); // 50ms delay here

The function uses one of the on board timers to generate a 1ms delay. That part works correctly. In some places the student used

delay1ms;

and this compiles without errors or warnings. No idea if that is expected behaviour, but I would have expected the compiler to complain about that.

Using RKit-STM8 2.26.09.0317, default project settings.

Replies
Post Information Post
+1
0
-1
May 3, 2010 - 5:53pm
Raisonance Support Team

No it isn't a bug.

It's like:

&delayms;

or

int i;

i;

Stéphane