GeorgRottensteiner / C64Studio

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

Circular inclusion #121

Closed truebluepl closed 2 months ago

truebluepl commented 3 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 3 months ago

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

GeorgRottensteiner commented 3 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 3 months ago

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

GeorgRottensteiner commented 3 months ago

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

GeorgRottensteiner commented 2 months ago

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