Ex: Definition before Use
Sample code…can annotate in several ways
- if (setVal(n, &buffer)) ...
Must buffer be defined before calling setVal?
- Yes: bool setVal(int d, char *val);
- No: bool setVal(int d, out char *val);
Is buffer defined afterwards?
- Yes: bool setVal(...); {modifies *val;}
- Maybe: bool setVal(...); {modifies nothing;}
- NO!: bool setVal(...); {ensures trashed(val);}