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

From STRIDE Wiki
Revision as of 00:51, 21 August 2009 by Timd (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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)