Console ReadLine and WriteLine in F#

Published on August 3, 2014 by abundantcode

Filed under F#

Last modified August 3, 2014

Print this page

rate 1 star rate 2 star rate 3 star rate 4 star rate 5 star
Your rating: none, Average: 0 (0 votes)

This article have been viewed 3023 times

Are you looking out for a simple F# program that reads the input from the Console Window and writes it back ? . Here’s a simple program to demonstrate it.

// AbundantCode F# Tutorials and Code snippets
open System
let main argv = 
    Console.Write("This is Abundantcode's First F# Program")
    let inputtext = Console.ReadLine()
     // Printing the entered input
    Console.Write("You entered:" + inputtext)
    0 // return an integer exit code


If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

Leave a Comment


You might be Interested in these Posts

How to get the Computer Name in C# ?

When working on a Winforms or Console application using C# , sometimes you might need to get the com...

FSharp Interactive Commands

FSharp Interactive UI includes few good number of commands which can be used by the F# Developers . ...

#time switch to measure the execution time in F#

If you want to measure the execution time of your F# code , you can use the #time attribute which le...