Anteckning
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
To annotate code in C, you include the SourceAnnotations.h file and then use the attributes to annotate function parameters or return values.
To annotate code in C
Add the #include <CodeAnalysis/SourceAnnotations.h> file to your project header file.
Next, use the attribute to annotate code.
Example
The following code shows how to annotate C code:
// MyCode.h
#include <CodeAnalysis/SourceAnnotations.h>
// MyCode.c
#include "MyCode.h"
void f ( [SA_Pre (Valid = SA_Yes)] int pWidth )
{
// code...
}
In C++, SA_ prefix is optional.