@print directive

Printing to stdio

The directive @print(x) writes the macro expanded form of x to stdio during the execution of the xcpp macro preprocessor. This could for example be used to display warning messages to the programmer. @println is the same as @print except that a linefeed is written afterwards. Alternatively, text can be written to stdio using the @runpython or @defpython directives:


@runpython
{
    print 'Hello, world'
    for i in range(4):
        print i
}