Forum Discussion
Altera_Forum
Honored Contributor
13 years agosscanf and sprintf
1. Version 13.0 vs 12.1sp1 Recently we try the version 13.0 with our working software in 12.1sp1 but we have a surprise it was not working properly. We have found why, it is because the compi...
Altera_Forum
Honored Contributor
13 years agoThanks dsl
I known that the best way for optimzation in speed and size for "1" function is to do something like your example. But let say you have about 100 Uart Ascii Serial protocol command (message length is between 20 to 100 bytes) to interpret and 100 structure to serialize to save it into flash or eeprom. To use a command like sprintf and sscanf clarify a lot your code and is more easy to understand and manage. I know that the function take memory a certain amount of space, but consider that those function are use more than 200 times, so you have to split by 200 the space of this function So your code will be smaller than to treath each case separatly like in your example Thanks a lot for the suggestion, but for know I think the best way should be sprintf and sscanf If you have another suggestion, feel free to suggest me