Alternative Syntax for Control Structures
suggest changeSyntax
- structure: /* code */ endstructure;
Remarks
When mixing the alternative syntax for switch with HTML, do not put any whitespace between the initial switch ($condition): and the first case $value:. That whitespace is treated as output before a case, which is a syntax error.
All control structures follow the same idea. Instead of curly braces, use a colon and an endstructure; statement: structure: /* code */ endstructure;
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents