![Image](http://atomsofttech.info/code/typo.jpg)
Should it be:
Code: Select all
void swap (int &x, int &y) {
int tmp = x;
x = y;
y = tmp;
}
Code: Select all
void swap (int &x, int &y) {
int tmp = x;
x = y;
y = tmp;
}
Code: Select all
# include <xs1.h>
in port oneBit = XS1_PORT_1A ;
out port counter = XS1_PORT_4A ;
int main ( void ) {
int x;
int i = 0;
oneBit :> x;
while (1) {
oneBit when pinsneq (x) :> x;
counter <: ++i;
}
}
Code: Select all
oneBit :> x;
Code: Select all
oneBit when pinsneq (x) :> x;
Code: Select all
counter <: ++i;
I think the official errata can be found on the book page on XMOS.com.Folknology wrote:Jason (Lopez) Good catch, maybe there should be an errata section on the forums for documentation/books etc..
Jason (XCore admin) could that be added?