this program uses the string prompt and replaces "{0}" with 5.651 and "{1}" with 3.427 and it works fine. when i change the string to "{0:c}" and "{1:c}" to replace the substring and format them as currency, "{0:f}" and "{1:f}" to replace the substring and format them as fixed point notation, "{0:e}" and "{1:e}" to replace the substring and format them as scientific notation, "{0:i}" and "{1:i}" to replace the substring and round to an integer, they all work independently. but when i try and put them into cases like if("{0}"), else if("{0:c}") it only works if i am looking for "{0}" anything else it doesnt work. I get a debug error. How do i fix this, what am i doing wrong? thanks in advance.
void main()
{
write("The number {0} is greater than {1}.\n", 5.651, 3.427);
}
the program works the way it is now but in main if i change, write("The number {0} is greater than {1}.\n", 5.651, 3.427); to, write("The number {0:c} is greater than {1:c}.\n", 5.651, 3.427); for example, the program doesnt work