I am just curious. I started out using Flowchart and found out that CASE is not supported. I found it easy to add it in using the BASIC code block. Then today I started to look into using Blockly and found out that SELECT CASE isn't available there either.
So my question. Why is SELECT CASE omitted, is it slow or something? What is the best way to implement/replace it (stacked IF .. THEN's ?)
I also dont understand why other simple commands are missing. like PULLUP mask and INPUTTYPE mask. Both useful and might be implemented as an option within the START block?
First impression is that Blockly runs faster than the Flowchart method. But I suspect normal code entry might be the optimum method. Its an interesting learning curve. I also find that PICAXE editor suite tends to be a little sluggish. So I might need a quicker PC!
Does Blocky replace or enhance Flowchart? I dont understand whether one is preferred over the other and why?
Blockly and Flowcharting are just two additional ways to represent program code as an alternative to Basic language text. Which is preferred mostly comes down to personal choice though one can argue advantages and disadvantages of each.
The biggest advantage of Blockly is that it is all block structured; there is no way to jump all over the place ( except for procedure calls which come back to where they started from ), and it's pretty clear where things should be dropped in to complete the program.
Blockly also seems to be something which is easy to use and fairly intuitive. All that put together means that it should be easier to produce programs which work.
Yes, in the short time that I have been using Blockly I can see that it is useful. I seem to lean towards Blockly, it just seems to run quicker. If I persist at this I can imagine using Blockly to block out the program, then switch to Basic in order to optimize (like replacing the If-then's with a Select Case in this example. I have just found that I can name variables, so things are looking up! But I appreciate the your help, thank you!
I seem to lean towards Blockly, it just seems to run quicker.
To an extent it probably is. Flowchart and Blockly both convert to Basic source code behind the scenes, which is compiled to executable code and then downloaded into the PICAXE. Because Flowcharts can jump all over the place there can be more explicit GOTO commands required which need executing. Blockly, being implicitly block-structured, will not need such GOTO commands and allows more optimal Basic source code to be generated.
If you click on the "Convert" ribbon option or toolbar icon when a Flowchart or Blockly program is shown in PE6 you can see what Basic source code is generated.