Default code update


#1

Hello,

following @Niako’s comment here, we plan to update (should be released this week) the default code when reading inputs from a line in a loop.

Exemples from the Temperature puzzle:

from

let t = Scanf.sscanf line "%d" (fun t -> (t)) in

to

let t = Scanf.scanf " %d" (fun t -> (t)) in


#2

It’s been some time since I dabbled in OCaml, but I certainly hope those HTML entities aren’t part of the actual code O:-)


#3

@_CG_Thibaud
Nice and sometime useful idea.

May I suggest to do
Scanf.scanf “%d " and not Scanf.scanf " %d” which seems more readable to me.

@JBM: no they’re not :smiley:


#4

wups copy paste issue :smiley:

About the space @Boulet , it was suggested by @Niako in the previous comment’ thread. I have no idea what’s best


#5

Trust me, my version is better