Using STATE DIAGRAMS for complex software.
Summary by: Ron Murawski (firstname.lastname@example.org)
User Group News
C/C++ User Group
The September C/C++ meeting was, as usual, on the third Tuesday of the month. It began with a Random Access period. Questions were asked about CGI, network hubs, mapping programs and the proper way for programs to respond to windows paint messages. The answers were good enough that all questioners seemed satisfied.
Group leader Bruce Arnold then presented some simple C code to convert a Comma Separated Value (CSV) file into aligned text using the standard C library function strtok(). The problem with the simple approach was its inability to properly handle quoted fields.
The main presentation, also by Bruce, was a somewhat more complex program that translates a CSV file into text properly. To simplify his design task, Bruce drew a "state diagram". State diagrams represent the logic of an algorithm. Using the diagram he was able to write his program without undue complexity. He used the logic contained within each "state" to write each small portion of his program. Joining the states within one big loop, he neatly solved his appointed challenge.
Source Code FilesFor help, email me at b a r n o l d @ i e e e . o r g