GeorgRottensteiner / C64Studio

C64Studio is a .NET based IDE specializing in game development for the C64 in assembler and BASIC
Other
260 stars 38 forks source link

Circular inclusion #121

Closed truebluepl closed 4 months ago

truebluepl commented 4 months ago

Hello Georg, Is there any possibility to include the same file twice? I have file (some sort of table) which should be included several times, but compiling process generates "circular inclusion" error.

truebluepl commented 4 months ago

I'm sorry, I forgot about macros:) They solve problem.

GeorgRottensteiner commented 4 months ago

Additionally there's the new !src "file", once directive.

You can place that several times, and C64Studio will only actually include it once. You have to use the ,once argument on every occasion for it to work though.

truebluepl commented 4 months ago

If I understood correctly, it's only "prevents" from multiple including - multiple included file is joined only once, right?

GeorgRottensteiner commented 4 months ago

Exactly. It just removes the need to futz around with making a manual include guard via defines.

GeorgRottensteiner commented 4 months ago

Closing this, if you need more help feel free to reopne