apltail
apltail copied to clipboard
Programs should be able to return more things than just a single number
Right now, the TAIL compiler will give a type error if the last expression is not a scalar of type double. This makes it awkward to write some programs - sure, you can use the print statement, but you still need a dummy 0
or whatever at the end. As an example, look at the mandelbrot.apl test program.
What should be the result if the last expression is an array or a function? Should we just return 0 a or what do you propose?
Den lørdag den 30. april 2016 skrev Troels Henriksen < [email protected]>:
Right now, the TAIL compiler will give a type error if the last expression is not a scalar of type double. This makes it awkward to write some programs - sure, you can use the print statement, but you still need a dummy 0 or whatever at the end. As an example, look at the mandelbrot.apl https://github.com/melsman/apltail/blob/master/tests/mandelbrot.apl test program.
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/melsman/apltail/issues/13
Can you just print the result, like you do with a scalar?
To be honest, I don't care - I am going to compile all TAIL programs that look like this, not run them!
\ Troels /\ Henriksen