porklib: Simple library for programming Arduino in C
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
avr-lib/lib_tests/test_loops_visual.c

26 lines
355 B

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <assert.h>
#include "lib/loops.h"
void main()
{
repeat(5) printf("Five times!\n");
repeatx(500) printf(".");
printf("\n");
int i = 0;
until (i == 100) i++;
until (i == 0) {
i--;
printf("i = %d\n", i);
}
printf("\n");
loop(moo, 7) {
printf("moo = %d\n", moo);
}
}