<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Chaddaï Fouché schreef op 20-2-2015 om
13:40:<br>
</div>
<blockquote
cite="mid:CANfjZRYmRCiahfD4NCuE+wY=skmqH6zftinSYJzhyWJ9CCdU6g@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex"><span
class="">On Fri, 20 Feb 2015 08:32:17 +0100, Roelof
Wobben <<a moz-do-not-send="true"
href="mailto:r.wobben@home.nl" target="_blank">r.wobben@home.nl</a>>
wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
First I thought to split the string on the " " but
according to google Haskell do not have a split
function.</blockquote>
</span></blockquote>
<div><br>
</div>
<div>As others have already said, Haskell does in fact have
a "split on spaces" function (words), and several others
flavors of splitting that makes it possible to dissect
your list as you wish. If you still want a split function
ala Perl, there is a solid "<a moz-do-not-send="true"
href="https://hackage.haskell.org/package/split">split</a>"
package on hackage which propose several standard function
and a very configurable generic version of the split
concept for all lists. Also, Data.Text comes with several
splitting functions for use with the Text datatype.</div>
<div><br>
</div>
<div>-- </div>
<div>Jedaï</div>
</div>
</div>
</div>
</blockquote>
<br>
<br>
<br>
Thanks all, <br>
<br>
Then I have to think about the cases. <br>
<br>
There are two cases which can fail. One is that the input is not the
format Char Int [Char] and one is that the first Char is not a I, W
or E. <br>
<br>
Is it wise to make on case of it. in pseudo-code <br>
<br>
!Errcode.isChar and !Errnumber.isInt and !ErrorText.isChar and
Errcode !="W" and Errcode !="I" and Errcode != "E" -> Unknown
"This is not in the right format"<br>
ErrorText = "I" -> "( Info + ) " + Errcode + " " " + ErrText +
"""<br>
<br>
Roelof<br>
<br>
<br>
</body>
</html>