How to create file Include Into A Code with Extention Inc

Started by bimin, Nov 18, 2022, 03:33 PM

Previous topic - Next topic

bimin

Hola All,
I want to create a file include inside my code with extention (Inc), and how to place or add that file, to make it file working in my code.
And how to edit it file with extention (Inc).
 Sample:  Include "PIC18F4550_Test.Inc"

Thanks,
Min

keytapper

Just put a line, where you want to insert your include file, then type Include  "PIC18F4550_Test.Inc"
Further information can be found on the manual with the same command name, IIRC
Ignorance comes with a cost

Ivano

You can edit it with Positron, notepad... or other text editor

keytapper

Ivano, you are right. I probably misinterpreted the OP question.
Ignorance comes with a cost

See_Mos

Write the code for your include file as normal in the editor. To test if the file is ok you can save it as a .bas  file and try to compile it.  When you are happy that the file is ok use save as a .inc file

You can just save it as .inc then if there is an error the file will open in the editor when you try to compile the main file.

Note that you cannot compile a .inc file on its own.

Ivano

Quote from: keytapper on Nov 19, 2022, 12:03 PMIvano, you are right. I probably misinterpreted the OP question.
In two together we both gave a complete answer :-) your answer included also had a question

bimin