XClave (or Chris’ Blog)

Missing format specifier.

2008, January, 17 · 2 Comments

I’ve been practicing my F# recently – I took a gap for a little bit, and just got back into it. I’ve been working through my ‘Foundations of F#’ book, and have hit a slight snag.

There is one line of code I can’t get to compile, I get the ‘Missing format specifier.’ error for the following line:

let print x = printfn “A%” x

The intellisense highlights under the “A%” bit.. Any ideas?

The hunt continues!

Update – worked it out, it should be “%A” rather than “A%” – looks like a typo!!

Categories: .NET · F#

2 responses so far ↓

  • Pankaj Sharma // 2009, August, 15 at 13:57 | Reply

    :-)

    I hit the same thing today. However, while looking at the various sites that came up as a result of search on Google, I realized that the format specifiers were starting with a percent and then followed by a character rather than the other way around! I gave it a try and that worked! :-)

    Thanks, but for making me feel that hadn’t I figured it out, your page was there to help me out! :-)

    Have a great day ahead!

  • Greg // 2009, October, 16 at 22:53 | Reply

    First hit on google for “missing format specifier”! Thanks for the help.

Leave a Comment