![]() See Literals (MSDN) for complete reference. Other common examples are F or f for 32-bit floating-point numbers, M or m for decimals, and I for big integers. let b, i, l = 86uy, 86, 86L val b : byte = 86uy val i : int = 86 val l : int64 = 86L Most numeric types have associated suffixes, e.g., uy for unsigned 8-bit integers and L for signed 64-bit integer. let poem = "The lesser world was daubed \n \ By a colorist of modest skill \n \ A master limned you in the finest inks \n \ And with a fresh-cut quill." Basic Types and Literals let tripleXml = """"""īackslash strings indent string contents by stripping leading spaces. let verbatimXml = don't even have to escape " with triple-quoted strings. ![]() Use verbatim strings preceded by symbol to avoid escaping control characters (except escaping " by ""). / Create a string using string concatenation let hello = "Hello" " World" / The `let` keyword defines an (immutable) value let result = 1 1 = 2 Stringsį# string type is an alias for System.String type. ![]() XML doc comments come after /// allowing us to use XML tags to generate documentation. (* This is block comment *) // And this is line comment Line comments start from // and continue until the end of the line. Commentsīlock comments are placed between (* and *). If you have any comments, corrections, or suggested additions, please open an issue or send a pull request to. This cheatsheet glances over some of the common syntax of F# 3.0. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |