Hello! I am trying to use sprintf, but get no result (C51, version 5.20).
char xdata command [80], i=100; strcpy (command, "Hello!"); // now command contains "Hello!" sprintf (command, "Test %d", i); // command has not changed
"I display the content of my variable before and after the sprintf command." Are you sure that it's the sprintf not working; could it be a problem with your display routine? Have you tried it on the simulator, so that you can watch exactly what's going on? Do you use optimisation? If so, have you tried disabling it?