Difference between revisions of "Studio:How do I apply an SCL pragma to an array?"
Line 11: | Line 11: | ||
#pragma scl_function(foo)<br> | #pragma scl_function(foo)<br> | ||
#pragma scl_values(*S_T.list, TRUE, FALSE)</tt> | #pragma scl_values(*S_T.list, TRUE, FALSE)</tt> | ||
− | |||
− | |||
− |
Revision as of 15:33, 5 February 2008
To apply an SCL pragma to an array, treat the array as if it was declared as a pointer and use pointer-type syntax. For example:
typedef unsigned char BOOL;
#define TRUE 1
#define FALSE 0
typedef struct
{
BOOL list[5];
int type;
} S_T;
int foo(BOOL flag, S_T p);
#pragma scl_function(foo)
#pragma scl_values(*S_T.list, TRUE, FALSE)