Khurram Khan wrote:
> We were thinking if its possible for you to translate this simple code of C++
> in Clean and provide some comments on it as well. We are certain that it will
> help solve I/O dilemma for us, and we are deeply thankful for the time you
> take out to help us.
>
> /* Just a simple program performing input/output to user console and
> performing a calculation*/
Hello, I think you will fare better when you postpone console I/O and
interaction a bit and get familiar with the basic features of Clean (everyday
types, local binding forms, patterns, guards), most conveniently by writing and
running simple programs such as the example below. [That's basically your C++
example but with hard-coded input and automatic display: Clean will display the
value of START in a console window. (This works better with mundane types such
as Real or [Int] instead of the whole world.)]
Best wishes; rt
__
module foo
import StdEnv
Start :: Real
Start = (a+b+c)/3.0
where
a = 12.3
b = -1.4
c = 23.1
_______________________________________________
clean-list mailing list
[email protected]
http://mailman.science.ru.nl/mailman/listinfo/clean-list