system, descripcion y ejemplo

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 /* system example : DIR */
00003 #include <stdio.h>
00004 #include <stdlib.h>
00005 
00006 int main ()
00007 {
00008   int i;
00009   printf ("Checking if processor is available...");
00010   if (system(NULL)) puts ("Ok");
00011     else exit (1);
00012   printf ("Executing command DIR...\n");
00013   i=system ("dir");
00014   printf ("The value returned was: %d.\n",i);
00015   return 0;
00016 }