Timeline for Calculator that adds char values
Current License: CC BY-SA 3.0
14 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 5, 2014 at 18:06 | history | edited | gxtaillon | CC BY-SA 3.0 |
Thanks to Flonk for suggesting `interact`.
|
Jun 5, 2014 at 18:05 | comment | added | gxtaillon |
Thanks for reminding me of interact . The worst part is that it's right under getContents , which I purposefully looked up in hoogle...
|
|
Jun 5, 2014 at 17:59 | comment | added | Flonk |
use interact and show instead of getContents>>=print : main=interact$show.sum.map fromEnum
|
|
Jun 5, 2014 at 17:25 | comment | added | core1024 |
D:\tests>type hw.txt Hello World! D:\tests>type hw.txt | sum.exe 1085
|
|
Jun 5, 2014 at 17:19 | comment | added | Knerd | Oh sorry, the quote is in, I forgot to type it -_- But that doesn't change the result. | |
Jun 5, 2014 at 17:11 | comment | added | gxtaillon | You are missing a quote it seems. | |
Jun 5, 2014 at 16:25 | comment | added | Knerd |
When I execute your code, I just get the string "Hello World!" as Output. This is my commandline: ECHO "Hello World! | ghci charsum.hs
|
|
Jun 5, 2014 at 15:06 | history | edited | gxtaillon | CC BY-SA 3.0 |
deleted 8 characters in body
|
Jun 5, 2014 at 15:04 | review | Low quality posts | |||
Jun 5, 2014 at 15:11 | |||||
Jun 5, 2014 at 14:54 | comment | added | Knerd | ok, I couldn't get it run on my Windows machine, I gonna try it on the rpi when I am at home | |
Jun 5, 2014 at 14:51 | history | edited | gxtaillon | CC BY-SA 3.0 |
deleted 17 characters in body
|
Jun 5, 2014 at 14:50 | comment | added | gxtaillon |
stdin. $ printf "Hello World!" | ./charsum
|
|
Jun 5, 2014 at 14:47 | comment | added | Knerd | From where does it read the text? | |
Jun 5, 2014 at 14:45 | history | answered | gxtaillon | CC BY-SA 3.0 |