HARSFEN0602
4.2.2 Mathematical And Logical Operators....................................................................................................................19
4.2.3 General rules for operators.................................................................................................................................... 20
4.2.4 Operator details......................................................................................................................................................20
4.2.5 Mathematical functions......................................................................................................................................... 24
4.2.6 Expressions............................................................................................................................................................25
4.3 Comments................................................................................................................................................................. 27
5 THE HARMONICA USER PROGRAMMING LANGUAGE ...........................................................................28
5.1 User Program Organization....................................................................................................................................28
5.2 Common.................................................................................................................................................................... 29
5.2.1 Line and Expression Termination..........................................................................................................................29
5.2.2 Line Continuation..................................................................................................................................................29
5.2.3 Limitations.............................................................................................................................................................30
5.3 Expressions And Operators.....................................................................................................................................30
5.3.1 Numbers................................................................................................................................................................ 30
5.3.2 Mathematical and Logical Operators.....................................................................................................................30
5.3.3 General rules for operators.................................................................................................................................... 30
5.3.4 Operator details......................................................................................................................................................31
5.3.5 Mathematical functions......................................................................................................................................... 31
5.3.6 Expressions............................................................................................................................................................31
5.4 Comments................................................................................................................................................................. 33
5.5 Program Flow Commands.......................................................................................................................................34
5.5.1 Labels (Entry points)............................................................................................................................................. 35
5.5.2 For iteration........................................................................................................................................................... 35
5.5.3 While iteration.......................................................................................................................................................36
5.5.4 Until iteration.........................................................................................................................................................37
5.5.5 Wait iteration.........................................................................................................................................................38
5.5.6 IF condition........................................................................................................................................................... 38
5.5.7 Switch selection.....................................................................................................................................................39
5.5.8 Break......................................................................................................................................................................40
5.6 Functions...................................................................................................................................................................40
5.6.1 Function definition................................................................................................................................................ 40
5.6.2 Dummy variables...................................................................................................................................................42
5.6.3 Count of output variables.......................................................................................................................................42
5.6.4 Automatic variables...............................................................................................................................................43
5.6.5 Global variables.....................................................................................................................................................44
5.6.6 Jumps.....................................................................................................................................................................44
5.6.7 Functions and The Call Stack................................................................................................................................45
5.6.8 Killing The Call Stack........................................................................................................................................... 47
5.6.9 Automatic subroutines...........................................................................................................................................47
6 PROGRAM DEVELOPMENT AND EXECUTION..........................................................................................51
6.1 Editing a Program....................................................................................................................................................51
6.2 Compilation...............................................................................................................................................................51
6.2.1 Compilation Error List...........................................................................................................................................51
6.3 Downloading and Uploading a Program................................................................................................................59
6.3.1 Binary data.............................................................................................................................................................60
6.3.2 The Assisting Commands For Down/Upload........................................................................................................60
6.3.3 Downloading a Program........................................................................................................................................61
6.3.4 Uploading a Program.............................................................................................................................................62