I want to add a bit more onto this. This document is very useful:
Also, if you’re unsure about the “.2” is before f, it’s basically stating how many decimal places to provide after the period. Source
If you want to know about what floats, doubles, etc. do and how they work, check out my tutorial video explaining what they mean here.
yea, this is an unfortunate side effect of the string getting parsed through a sprintf like function more than once.
here are two ways that work, they may not work in the future if I ever address that bug.
Printf style ‘%’ format specifiers are already confusing for the novice programmers. It would be so much better if everything was kept as simple and as close to standard C behavior as possible. This way they could rely on multiple online tutorials covering legacy C programming.
No, it’s a bug I need to deal with, it’s just been low priority. It’s won’t get fixed in 1.0.13 (or the next VEXcode release as it may be an SDK issue) as we already have a release candidate, but perhaps the following one.
That’s on me. I was converting some really old python strings from the old style (using the % operator) and forgot to delete the %. It has nothing to do with escaping a percent sign.
Your post that I quoted above was appropriate and helpful. It would have been better if you led with that post instead of the unnecessary and incorrect snark in your first post. Please try to always be respectful when interacting with others whether it’s in person or on a public forum.