HARSFEN0602ElmoHARmonicaSoftwareManual

PRELIMINARYDRAFT

 

 

 

 

 

 

 

 

 

 

56

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

39

Code is too complex

 

User program contains very complex code that includes too many nested

 

 

 

 

 

 

levels (actually this expression contains more than 100 nested levels). Nested

 

 

 

 

 

 

expression means one flow control block inside other, e.g. ‘if’ block inside

 

 

 

 

 

 

‘while’ loop.

 

 

40

Line compilation is

 

General error during attempt to compile expression.

 

 

 

 

failed

 

 

 

 

 

 

41

Case must follow

 

After ‘switch’ statement the only legal statement is ‘case’, otherwise this

 

 

 

 

switch

 

error occurs.

 

 

 

 

 

 

For example,

 

 

 

 

 

 

switch a

 

 

 

 

 

 

b = 0 ;

 

 

 

 

 

 

case 1,

 

 

 

 

 

 

b =1 ;

 

 

 

 

 

 

end

 

 

 

 

 

 

The expression ‘b = 0’ is illegal, because ‘switch’ must be followed by

 

 

 

 

 

 

‘case’.

 

 

42

Illegal case after

 

‘otherwise’ statement must be the last statement of ‘switch’ block. Any ‘case’

 

 

 

 

otherwise

 

after ‘otherwise’ is illegal.

 

 

 

 

 

 

For example,

 

 

 

 

 

 

switch a

 

 

 

 

 

 

case 1,

 

 

 

 

 

 

b =1 ;

 

 

 

 

 

 

otherwise

 

 

 

 

 

 

b = 0 ;

 

 

 

 

 

 

case 2,

 

 

 

 

 

 

b = 1 ;

 

 

 

 

 

 

end

 

 

 

 

 

 

The statement ‘case 2’ is illegal, because ‘otherwise’ must be the last

 

 

 

 

 

 

statement of ‘switch’.

 

 

43

Bad nesting

 

This error treats flow control block contradictions: ‘else’ without ‘if’,

 

 

 

 

 

 

mismatched ‘end’, some flow control without ‘end’ etc.

 

 

44

Code is not expected

 

This error occurs if there is some unexpected code for evaluation: after

 

 

 

 

 

 

‘otherwise’ or after ‘end’ or after ‘else’ etc.

 

 

45

Bad flow control

 

This error occurs in ‘for’ statement if there is no a sign '=' after the iteration

 

 

 

 

expression

 

variable name.

 

 

 

 

 

 

For example,

 

 

 

 

 

 

For k

 

 

 

 

 

 

a = 0 ;

 

 

 

 

 

 

end

 

 

 

 

 

 

After ‘k’ sign ‘=’ is absent.

 

 

46

Too many errors

 

This error appears when buffer with compilation error is full.

 

 

47

Expression is out of

 

Some executable code must be inside either function or label, otherwise this

 

 

 

 

function

 

error occurs.

 

 

 

 

 

 

For example,

 

 

 

 

 

 

int a1; ** Global variable definition

 

 

 

 

 

 

a1 = 0 ; ** Executable code

 

 

 

 

 

 

function foo (int a) ** Function definition

 

 

 

 

 

 

Executable code is illegal, because it is out of function.

 

 

48

Otherwise without any

 

This error occurs if straight after ‘switch’ statement ‘otherwise’ appears.

 

 

 

 

case

 

For example,

 

 

 

 

 

 

switch a

 

 

 

 

 

 

otherwise

 

 

 

 

 

 

b = 0 ;

 

 

 

 

 

 

end

 

 

 

 

 

 

After ‘switch’ statement ‘case’ is expected, not ‘otherwise’.

 

 

49

Misplaced break

 

‘break’ is legal only inside ‘switch’, ‘for’ or ‘while’ block, otherwise, this

 

 

Page 58
Image 58
Elmo HARmonica, HARSFEN0602 software manual Preliminarydraft