Proposal for a I/O API

tatien:
2. Use the sdtio library (fopen, fprintf, etc.) The nice thing with this is that it's pretty standard for C users. It would be "the way to go" if Arduino had been designed for C users, but it's not -- and that's a good thing most of the time -- so it means that it's not very standard for Arduino users.

Code example (I don't even know if we can do that, I'm not super familiar with the stdio library):

FILE* f = open_dataflash();

int x;
fscanf(f, "%d\n", &x);
rewind(f);
fprintf(f, "Hello word\n");
fclose(f);




Any ideas, suggestions, questions?

There is an stdio.h that you can use, here's the documentation avr-libc: <stdio.h>: Standard IO facilities. If you look up examples of it around the internet you'll see that as long as you define a function to "put char" and "get char", you can use printf to wherever you want. Although, it might only be available for one stream (file if you wish).
Although, I do remember thinking stdio.h was the sliced bread of microcontrollers until I saw the memory footprint it left. But then again, at the time I didn't bother looking up the definitions of the compiler regarding floating point conversions and such... so that may also have an impact.

But, give it a try. Even if it's not feasible, or limited, it isn't a waste of time, since I'm quite sure that the 2560 would benefit form such implementation, or maybe a 512kb memory device in the future.