Thorium (2) [Avatar] Offline
#1
Hello!

If I try to copy & paste some source code from the pdf-book to F#, the code won't work.

The reason is that there is code has comments marked with #, e.g.:
let x = 1 #A
let y = x + 2 #B
...
Description: Code line #A defines a variable and...

But # is not a valid comment marker in F#.
They should be either // or (* *) like this:
let x = 1 //A
let y = x + 2 //B
...
or:
let x = 1 (*A*)
let y = x + 2 (*B*)
...

Editor: Please change this!
Tomas Petricek (160) [Avatar] Offline
#2
Re: Code comments
Hello,
thanks for the feedback - this is an unfortunate consequence of how the typesetting process works at Manning. In the final version, the marks (like #A) will be turned into some visual elements and so they will not confuse the copy & paste.

We are working on putting together a github repository with all the samples, so that people do not need to copy code from the documents.

Thanks,
Tomas