Documentation snippet fixes

This commit is contained in:
Thomas Denney 2016-08-10 10:51:55 +01:00
parent 4430391e87
commit 41a4dfeb68
3 changed files with 9 additions and 11 deletions

View File

@ -49,15 +49,13 @@ The micro:bits *scheduler* provides the capability to concurrently execute di
The first job of the scheduler is to allow multiple *subprograms* to be queued up for later execution . For our purposes, a subprogram is just a statement or sequence of statements in the context of a larger program. Consider the Touch Develop program below for counting button presses.
```blocks
export function countButtonPresses() {
let count = 0
input.onButtonPressed(Button.A, () => {
count = count + 1
})
basic.forever(() => {
basic.showNumber(count, 150)
})
}
let count = 0
```
The program above contains three statements that execute in order from top to bottom. The first statement

View File

@ -49,7 +49,7 @@ basic.clearScreen()
It's a syntax error to have a left parenthesis without the "closing" right parenthesis:
```typescript
```
basic.clearScreen(
```

View File

@ -5,7 +5,7 @@ Reading and writing data over a serial connection.
```cards
serial.writeLine("");
serial.writeNumber(0);
serial.writeValue(x, 0);
serial.writeValue("x", 0);
serial.writeString("");
serial.readLine();
serial.redirect(SerialPin.P0, SerialPin.P0, BaudRate.BaudRate115200);