[clean-list] My very first program crashes!

Frantisek Fuka fuxoft@terminal.cz
Mon, 28 May 2001 13:45:49 +0200


It's without doubt that the program had errors, but is it normal that it 
produces no compile errors and simply CRASHES? I thought that the main 
benefit of CLEAN is that it has no run-time crashes...

Maarten de Mol wrote:

>>I Downloaded latest CLEAN for Windows 98 and I managed to compile and
>>run many of the included examples, including thecomplex ones (hanoi,
>>scrabble). Then I tried my first program:
>>
>>--------------------------
>>module test1
>>
>>import StdEnv
>>
>>pow x n
>>|n==1 = x
>>|otherwise = pow x n-1
>>
> 
> Try exchanging "pow x n-1" by "pow x (n-1)".
> Your current expression is interpreted as "(pow x n)-1",
> because function application always binds higher than
> 'infix' application.
> 
> 
>>Start = pow 3 2
>>--------------------------
>>
>>It compiles without errors, launches the DOS console and immediately
>>crashes (STACK FAULT). I even tried restarting my computer, erasing
>>everything in "Clean System Files", compiling again, but it still
>>crashes...
>>
>>



-- 
                                          Frantisek Fuka
(yes, that IS my real name)
(and it's pronounced "Fran-tjee-shek Foo-kah")
----------------------------------------------------
My E-mail:   fuxoft@terminal.cz
My Homepage: http://www.fuxoft.cz
My ICQ:      2745855