User Tools

Site Tools


debugging_complex_programs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
debugging_complex_programs [2018/12/26 11:27] – [Debug messages] emozolyakdebugging_complex_programs [2021/01/19 13:57] – [Proper commenting] emozolyak
Line 1: Line 1:
 +
 +
 ====== Debugging complex scripts ====== ====== Debugging complex scripts ======
  
 ===== Project initialization ===== ===== Project initialization =====
 +
 +
  
 ==== Non - volatile registers ==== ==== Non - volatile registers ====
Line 57: Line 61:
  
 It is recommended that you split complex scripts into simpler and more frequently used functions that you can reuse. Dividing tme into simpler parts, arranging them in the right order and grouping helps to control the logic of the system and makes it easier to set up the system.  It is recommended that you split complex scripts into simpler and more frequently used functions that you can reuse. Dividing tme into simpler parts, arranging them in the right order and grouping helps to control the logic of the system and makes it easier to set up the system. 
 +
 +===== Proper commenting =====
 +Use commenting you will understand next time you or someone will see you code.
 +<code lua>
 +----------------------------------------CALC. DAY ECONOMY --------------------------------------------------
 +    LimitMonthDayYesterday = GetReg("LimitMonthDayYesterday1"             -- Yesterday's limit
 +    HeatEnergyDay= GetReg("HeatEnergyDay"                                 -- Heat qty. for yesterday
 +    WriteReg("SavingDay1", (LimitMonthDayYesterday - HeatEnergyDay))        -- Economy for the day                          
 +------------------------------------------------------------------------------------------------------------ 
 +</code>
  
  
debugging_complex_programs.txt · Last modified: 2022/01/15 20:50 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki