Help with code
MikeKn22@aol.com
MikeKn22@aol.com
Tue, 03 Apr 2001 08:07:26 EDT
------_Part_3ac9bcfe-035f-2a7e-010203040506
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
I thank everyone who answered my last question. I think I am making progress. My new problem really has me confused. I guess it is because I am new to the language. To make this wode run, put the .txt file in under c:/ and then load the .hs file in hugs98. After that you can type the comman testReadFile at the main prompt. The result is:
["","assign","","int>",""]
which seems all wrong to me since it is returning the tail of each string in my string list. When I just want the tail of the string list itself which should be
["<assign>","=","<int>","3"]
The same type of thing happen when I tried returning the head of the list in which I believe the string
"x<=<3" was returned when only "x" should have been retured. Any ideas why head and tail are acting on each string of my string list rather then the string list itself? Thanks much in advance.
Rob
------_Part_3ac9bcfe-035f-2a7e-010203040506
Content-Type: application/octet-stream; name="words.hs"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="words.hs"
bW9kdWxlIExleCB3aGVyZQ0KDQppbXBvcnQgSU8NCg0Kd2hpdGVzcGFjZSA6OiBTdHJpbmcN
CndoaXRlc3BhY2UgPSBbJ1xuJywnXHQnLCcgJ10NCg0KZ2V0V29yZCA6OiBTdHJpbmcgLT4g
U3RyaW5nDQpnZXRXb3JkIFtdID0gW10NCmdldFdvcmQgKHg6eHMpDQoJfCBlbGVtIHggd2hp
dGVzcGFjZSA9IFtdDQoJfCBvdGhlcndpc2UgICAgICAgICA9IHggOiBnZXRXb3JkIHhzDQoN
CmRyb3BXb3JkIDo6IFN0cmluZyAtPiBTdHJpbmcNCmRyb3BXb3JkIFtdID0gW10NCmRyb3BX
b3JkICh4OnhzKQ0KCXwgZWxlbSB4IHdoaXRlc3BhY2UgPSAoeDp4cykNCiAJfCBvdGhlcndp
c2UgICAgICAgICA9IGRyb3BXb3JkIHhzDQoNCmRyb3BTcGFjZSA6OiBTdHJpbmcgLT4gU3Ry
aW5nDQpkcm9wU3BhY2UgW10gPSBbXQ0KZHJvcFNwYWNlICh4OnhzKQ0KCXwgZ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