158Views4Replies

Author Options:

How to post Arduino code with pointy braces () Answered

The Arduino code in my instructable contains '#include < AFMotor >' . The <AFMotor>, which keeps disappearing when I hit 'save', I guess it is interpreted as a tag. I have tried &lt; / &gt; but without success. Thanks,

Comments

The forums are retiring in 2021 and are now closed for new topics and comments.
0
kelseymh
kelseymh

10 years ago

If you hit the "Source" button from the Rich Editor interface, then you can use the lt/gt entities to deal with this stupidity. This is a generic problem trying to post any kind of C/C++ code.

0
landmanr
landmanr

Reply 10 years ago

When I do that, and hit 'save' it turns the ampersand codes into < and >, so it doesn't work somehow.

0
kelseymh
kelseymh

Reply 10 years ago

Yes, that's what's supposed to happen. But they should show up from that point on as exactly the literal angle brackets, and not get re-interpreted as "tag delimiters." Look at your comment right here. Or, at what I'm typing now:

I type "ampersand-l-t-semicolon": <
I type "ampersand-g-t-semicolon": >
Here's an include statement: #include <assert.h>

0
landmanr
landmanr

Reply 10 years ago

Hm. Just found out that it only works when there is a SPACE behind the "ampersand-l-t-semicolon". Anyway, I can finally continue! Thanks, kelseymh.