On Sun, 9 Apr 2000, Paul Saxton wrote:
> Hello!
>
> I am a student attempting to do some programming with HUGS. I have downloaded you
>FEB 2000 build and all I want it to do is to run a program from a file. I tried to
>put the following into a normal text file [1,3,5]!!2
> This did not work, HUGS said
>
> "ERROR "d.txt" (line 1): Syntax error in declaration (unexpected '}', possibly due
>to bad layout)
The above's an expression, whilst files contain function/datatype
definitions along with (possibly) a function called main which is treated
specially in that for runhugs and the haskell compilers this function is
automatically run upon startup. Using normal hugs, try
prog x=[1,2,3]!!x
(so you're defining a program `prog') in the file, load it in and then
evaluate prog 2 (for example). I think the included documentation gives
you some examples to show this kind of thing. HTH,
___cheers,_dave________________________________________________________
www.cs.bris.ac.uk/~tweed/pi.htm|ALERT: you are communicating with an
email: [EMAIL PROTECTED] |unsavoury individual with a copy of gdb
work tel: (0117) 954-5253 |who reverse-engineered a file format.