Studio:How do I apply an SCL pragma to an array?

From STRIDE Wiki
Revision as of 21:33, 5 February 2008 by Root (talk | contribs)
Jump to navigation Jump to search

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)