Compiler Questions! - What does it do? Why does it take a while? Are there ways to speed it up?
#4

If you want to see how macros are resolved one by one, have a look here. Select "Resolve macros" in the drop-down next to the run button.

Some demo macros:
pawn Код:
#define SOMETHING(%1,%2) FUNC_%1(%2)
#define FUNC_Foo(%1) FooFunc(%1 * 5)
#define FUNC_Bar(%1) BarFunc(50, %1 + 20)

SOMETHING(Foo, 20);
SOMETHING(Bar, 30);

#define DURATION(%1)        (DURATION_PT:%1,0)
#define DURATION_PT:%1,     (%1:DURATION)+_:DURATION_PT:

#define second%1:DURATION
#define seconds%1:DURATION
#define minute%1:DURATION   * DURATION_MINUTE
#define minutes%1:DURATION  * DURATION_MINUTE
#define hour%1:DURATION     * DURATION_HOUR
#define hours%1:DURATION    * DURATION_HOUR
#define day%1:DURATION      * DURATION_DAY
#define days%1:DURATION     * DURATION_DAY
#define week%1:DURATION     * DURATION_WEEK
#define weeks%1:DURATION    * DURATION_WEEK
#define month%1:DURATION    * DURATION_MONTH
#define months%1:DURATION   * DURATION_MONTH
#define year%1:DURATION     * DURATION_YEAR
#define years%1:DURATION    * DURATION_YEAR

// Scroll down or pull up the middle bar to see this
new
    g_SomeDuration = DURATION(20 minutes, 1 hour, 20 seconds)
;
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)