Locked statements

Table of Contents

Previous | Top | Next

Every statement in the Pseudocode Editor must start with an associated keyword other than the assignment statement. If a statement's keyword is modified then one of three things could happen:


1.The statement’'s keyword was changed to another keyword and the statement type changes accordingly.
2.The statement’'s keyword was unrecognised, it has children and is marked as suspect.
3.The statement’'s keyword was unrecognised, it doesn'’t have children and is turned into an assignment statement.


The scenarios outlined above apply to most upfront-design situations. However, sometimes when you write code you may not start your comments with the expected keyword in Code Rocket. For example, "“If condition is valid"” could alternatively be commented with “"Check if condition is valid”" depending on your style. When Code Rocket turns your code into design, it would be wrong to apply one of the strategies outlined above when the design changes. To avoid this situation, Code Rocket applies a “lock” to any statement from your code that isn'’t commented with a matching keyword. This lock means that the statement's type will remain constant until it is manually unlocked.


Locked Statement


When a statement is unlocked, we apply the appropriate rule. You can unlock a statement by double clicking on the padlock in the left hand margin of the Pseudocode Editor.