Notifications
Clear all

Post code test


Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3045
Topic starter  

Using <> after IDE 2.0.0 Copy for Forum (Markdown)

```cpp
int8_t PCintPort::addPin(uint8_t arduinoPin, PCIntvoidFuncPtr userFunc, uint8_t mode)
{
	PCintPin* tmp;
	tmp=firstPin;
	if (firstPin != NULL) {
		do {
			if (tmp->arduinoPin == arduinoPin) { enable(tmp, userFunc, mode); return(0); }
			if (tmp->next == NULL) break;
			tmp=tmp->next;
		} while (true);
	}
```

Using {;} after IDE 2.0.0 Copy for Forum (Markdown)

 

```cpp int8_t PCintPort::addPin(uint8_t arduinoPin, PCIntvoidFuncPtr userFunc, uint8_t mode) { PCintPin* tmp; tmp=firstPin; if (firstPin != NULL) { do { if (tmp->arduinoPin == arduinoPin) { enable(tmp, userFunc, mode); return(0); } if (tmp->next == NULL) break; tmp=tmp->next; } while (true); } ```

It is considered poor judgement to traverse a chasm in 2 leaps.


Quote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3045
Topic starter  

Following the HELP steps. Simple select and copy from source, paste into here after a couple blank lines and add a couple blank lines after.

 

const char*macToString(uint8_tmac[6]) {
staticchars[20];
sprintf(s, "%02X%02X", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
return s;
}
 

 

 

 

 

 

It is considered poor judgement to traverse a chasm in 2 leaps.


ReplyQuote
frogandtoad
(@frogandtoad)
Noble Member
Joined: 3 years ago
Posts: 1387
 

@zander

Posted by: @zander

Using <> after IDE 2.0.0 Copy for Forum (Markdown)

```cpp
int8_t PCintPort::addPin(uint8_t arduinoPin, PCIntvoidFuncPtr userFunc, uint8_t mode)
{
	PCintPin* tmp;
	tmp=firstPin;
	if (firstPin != NULL) {
		do {
			if (tmp->arduinoPin == arduinoPin) { enable(tmp, userFunc, mode); return(0); }
			if (tmp->next == NULL) break;
			tmp=tmp->next;
		} while (true);
	}
```

Using {;} after IDE 2.0.0 Copy for Forum (Markdown)

 

```cpp int8_t PCintPort::addPin(uint8_t arduinoPin, PCIntvoidFuncPtr userFunc, uint8_t mode) { PCintPin* tmp; tmp=firstPin; if (firstPin != NULL) { do { if (tmp->arduinoPin == arduinoPin) { enable(tmp, userFunc, mode); return(0); } if (tmp->next == NULL) break; tmp=tmp->next; } while (true); } ```

As I mentioned else thread... the new Arduino IDE does not offer saving your code to HTML - I don't know why, but if you have an account, I'm sure they will look at any enhancement requests put to them, as their issue tracker seems to have many enhancement requests already recorded on their GitHub site.

Cheers


ReplyQuote