Welcome, Guest. Please login or register.

Author Topic: SAS/C var_arg Macros  (Read 936 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline SidewinderTopic starter

  • Full Member
  • ***
  • Join Date: Mar 2002
  • Posts: 241
    • Show all replies
    • http://www.liquido2.com
SAS/C var_arg Macros
« on: March 19, 2010, 04:22:47 PM »
I'm attempting to create a debug macro in SAS/C.  The C99 code would be something like:

#define DEBUG_PRINT(format, ...)   printf(format, ...)

But since SAS/C isn't C99 that won't work.  So I tried:

#define DEBUG_PRINT(x)  printf x

Which also faild to work, saying that there are too many arguments when I do something like:

DEBUG_PRINT("%s\n", "hello");

Anyway, what is the proper way to define var_args macros in SAS/C?

Thanks.
Sidewinder