I was browsing through the file RobotCIntrinsics.c, and noticed that it contains intrinsics for the NXT (starting ~line 680). As I was operating in ROBOTC for Cortex/PIC, I was wondering why the intrinsics file contains this section.

No, if you look carefully you will see that sections are demarked with precompile pragmas that will compile certain parts into your program, depending on which platform you're currently using. Some sections apply to multiple platforms, others just to one.

No, if you look carefully you will see that sections are demarked with precompile pragmas that will compile certain parts into your program, depending on which platform you're currently using. Some sections apply to multiple platforms, others just to one.

I use a similar technique in my driver suite. All of my drivers that can potentially be used with a Sensor MUX have the code for it. However, it's not until you include a very specific driver file (the one for the actual SMUX itself) that this code becomes compiled into your program. That saves space and it saves me the hassle of having to maintain many different driver files that share quite a lot of common code.

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum