int values[256];
int fhandle;
fhandle=fopen("myfile.dat", "w"); // file open -write
fprintf(fhandle, "%d", values); // writes complete array of int?
fclose(fhandle); // file close
next question:
where do have I do specify the fsize?
In your signature you say: let NXC reach ACDC! -- but here you are trying to push it off the road. In the Standard C library, printf doesn't allow what you are asking for.
I don't understand quite right what you want to say:
fprintf is both ANSI C and NXC - my question now is related to NXC.
So is it possible to write arrays of int to a file? (It's not documented in the NXC help)
Or should I use fprint instead to your opinion?
At least using ANSI C with arrays of char it seems to work:
The implementation of printf and fprintf in the NXC API both support only a single scalar value. They both use the fmtnum enhanced NBC/NXC firmware opcode to format the single value into a string. Neither supports multiple scalar values, strings, or arrays of any kind.