-
Notifications
You must be signed in to change notification settings - Fork 6
Prefix Breakdown
The first letter in the prefix is capital and those are to distinguish containers ( aka functions or sections of code that are all connected ). If there are over 26 different containers, there will be double letters in the front of the prefix. Starting with AA, AB, AC...BA, BB...ZZ. There is the functionality to reach only up to ZZ and after the the program is out of bounds.
There is a numeral after the first letter (or two) in the prefix. This corresponds to the NEXT relationship of the block. The first block could be A1 and the second which is directly below A1 would be A2. This is similar to the nesting counting.
##Nesting:
Nesting is shown by periods. Each time a period is seen in the prefix that means it is another depth inwards. The depth starts at 1 and gets increased from there. Examples: C1.3.1 is at depth 3, A1.2.1.1.1 is at depth 5, A3 is at depth 1. There can be numerous blocks at the same depth and the difference between their prefixes will be the last number on the prefix string. For example, A1.1 is the block directly above A1.2 and C3.3 is directly below C3.2.
##Blocks that return: The blocks that return have their connectors on the left side of the block. These blocks are labelled starting with their parent blocks prefix (parent is the block that it is connected to on the left). For the first block following there will be an 'a' added on to the end. In the example below this is shown by the print block. Their names are A2.1 and A2.1a. If there was another block to be added after the text block it would be labelled A2.1aa (yes I know in this example it is not possible but using other than print and text blocks it is possible).
##Blocks Within: These are the blocks that are physically inside of another block. There are two naming possibilities for blocks that are within other blocks. A block directly within a block (VALUE within BLOCK) and a block within a block, that is directly within a block (aka a VALUE within VALUE within BLOCK).
VALUE within BLOCK -
These are named by the order that they are in from left to right. The outer block that is holding this value will have a prefix. So to get the prefix of the first block that is within the prefix will be the same as the parent but add and 'a' to the end. If there are 3 separate value blocks within this parent (like in the loop block 'count with i from...'), they would have the same prefix as their parent with and 'a', 'b', or 'c' added on to the end (respectively from left to right).
VALUE within VALUE within BLOCK -
These are the blocks that are within the blocks that are within a parent block. See the example below (the if statement has 2 blocks that are VALUE within VALUE within BLOCK). The VALUE within the VALUE will take the prefix of the block it is within and start a new count (using letters) at the end. The below example explained, there is an if block named A1 and the condition reads item is less than zero. The if blocks prefix is A1. The comparison block is named A1a. The first block inside of the comparison block is A1aa and the second inside is A1ab. See below for clarification.
