Comparison of programming languages (basic instructions): Difference between revisions

Content deleted Content added
Tag: nowiki added
Tag: nowiki added
Line 2,841:
|-
| OCaml
| <tt>'''let''' x '''= read_int ()''' or <br/> '''let''' str '''= read_line ()''' or <br/> '''Scanf.[[scanf]]''' format '''(fun '''x ...''' <nowiki>-></nowiki> '''...''')'''</tt>
| <tt>'''print_int''' x or <br/> '''print_endline''' str or <br/> '''Printf.[[printf]]''' format x ...</tt>
| <tt>'''prerr_int''' x or <br/> '''prerr_endline''' str or <br/> '''Printf.[[fprintf|eprintf]]''' format x ...</tt>
Line 2,856:
|-
| Haskell (GHC)
| <tt>x '''<- readLn''' or <br/> str '''<nowiki><-</nowiki> getLine'''</tt>
| <tt>'''print '''x or <br/> '''putStrLn''' str</tt>
| <tt>'''hPrint stderr '''x or <br/> '''hPutStrLn stderr''' str</tt>