The tags used to create a code box in a forum message are called 'BBCode',
described here: https://en.wikipedia.org/wiki/BBCode
In this forum, these tags are mostly used for code and quotes.
About making attachment of files, there are limitations on what file types are allowed,
that may be different between the different subforums.
Generally, .c source code files are allowed as attachments, but header files are not.
If you go into '(Open Full Version)' in the message editor, it should list what filetype extensions are allowed.
This 'PIC24 topics' forum seem to be most restrictive.
Rather than showing fragments and snippets,
it may be relevant to provide a small complete project that may be compiled and debugged,
without having to recreate work you have already done, with possibly a different outcome.
In MPLAB X there is a 'Package' facility that will collect files needed to restore a project:
In 'Projects' panel, the upper left part of MPLAB window,
point to root of the project,the small IC package icon, and Right-click.
This should open a long Pop-up menu, where 'Package' is available.
The resulting zipfile may be used as attachment to a message.
For this to be successfull, project must be possible to build, but doesn't nessesarily have to function as expected.
post edited by Mysil - 2020/02/27 07:11:41