19,279
edits
(wording; shortening a sample; improving a sample) |
(→Syntax: moving details to BSL:Syntax; some syntax corrections) |
||
Line 44: | Line 44: | ||
:''See [[BSL:Syntax]] for details.'' | :''See [[BSL:Syntax]] for details.'' | ||
===Punctuation=== | |||
Braces define blocks of code, whether the block is a function or a conditional: | Braces define blocks of code, whether the block is a function or a conditional: | ||
Line 73: | Line 72: | ||
The same code would look like this in shell-style BSL: | The same code would look like this in shell-style BSL: | ||
func some_function | func void some_function(void) | ||
{ | { | ||
var int a | var int a; | ||
a = 4 | a = 4 | ||
sleep 60 | sleep 60 | ||
if (a eq 4) | if (a eq 4) | ||
{ | { | ||
dprint "Hello" | dprint "Hello" | ||
} | } | ||
} | } | ||
Notice that parentheses are always needed with "if" statements | Notice that parentheses are always needed with "if" statements and semicolons are always needed on variable declarations. | ||
==Types== | ==Types== |