![](/media/cache/profiles/878a0658e652765c4979dba411787e43.50x50_q85.png)
No Structure left
Revision 0:f04fcc9952e1, committed 2011-01-22
- Comitter:
- microfreak
- Date:
- Sat Jan 22 21:53:03 2011 +0000
- Commit message:
- Compiler Format Button
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r f04fcc9952e1 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sat Jan 22 21:53:03 2011 +0000 @@ -0,0 +1,49 @@ +#include "mbed.h" + +DigitalOut myled(LED1); + +int lp1, lp2, lp3, lp4, lp5, lp6, lp7, lp8, lp9, lp10; + +char* AStr = "AAAAAAAAAAAAAAAAAAAAAAAAAA\r\n"; +char* PStr = "PPPPPPPPPPPPPPPPPPPPPPPPPP\r\n"; +char* SStr = "SSSSSSSSSSSSSSSSSSSSSSSSSS\r\n"; +char* LStr = "LLLLLLLLLLLLLLLLLLLLLLLLLL\r\n"; +char* QStr = "QQQQQQQQQQQQQQQQQQQQQQQQQQ\r\n"; + + +void foo( int &i,char *str) { + int x; + + printf("String is: %s\n",str); + if (i == 0) { + printf("i is 0\n"); + } + else + { + for (x=1; x <= i; x++) { + printf("Value of &i und x: %d %d\n",i,x); + myled = 1; + wait(0.25); + myled = 0; + wait(0.25); + } + } + + } + + int main() { + + lp1 = 5; + foo( lp1,AStr); + + lp1 = 0; + foo( lp1,SStr); + + lp1 = 7; + foo( lp1,QStr); + + + } + + +
diff -r 000000000000 -r f04fcc9952e1 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sat Jan 22 21:53:03 2011 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/e2ac27c8e93e