Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
13 years ago.
how to add a code block to a question
I understand that code should be inserted between <<code>> <</code>> tags.
When I do this, the pasted code does not keep the colors.
please explain how to correclty insert a code block in a question.
- Jim
3 Answers
13 years ago.
thanks all. Should have spotted the "editing tips" ... hidden in plan view!! j
13 years ago.
Test!
The following is pasted using <<code>> <</code>> as per editing tips.
But as you say appears black only in preview. Lets see how it looks after posting!
#include "mbed.h"
DigitalOut myled(LED1);
int main() {
while(1) {
myled = 1;
wait(0.2);
myled = 0;
wait(0.2);
}
}
Ahhh, well it is in colour after posting, but not in preview, so all is OK. For anyone else (Not James!) who is unsure on editing, click on the <Editing tips> at the bottom right of the editing pane for clear instructions.
Make sure you put the block instructions at the beginning of a new line as shown.
posted by 18 Nov 2012