
-----------------------------------
Raku
Fri Feb 23, 2007 4:58 pm

Help!
-----------------------------------
Well, I found a program script and it works fine at school when I run it, but then when I run it at home it gives me an error saying

'DistancePointLine' is not in the export list of 'Math'

Can anyone help me?

-----------------------------------
Clayton
Fri Feb 23, 2007 5:02 pm

Re: Help!
-----------------------------------
what version of Turing are you using at home? your error means that the function DistancePointLine (found in the Math. module) is not exported, or available for use.

-----------------------------------
Raku
Fri Feb 23, 2007 5:04 pm

RE:Help!
-----------------------------------
4.04c. It's the same as at school..O.o

-----------------------------------
Cervantes
Fri Feb 23, 2007 5:09 pm

RE:Help!
-----------------------------------
Freakman is right. However, this does not mean you have to get a new version of Turing at home. You can [url=http://www.compsci.ca/v3/viewtopic.php?t=9862]extend Turing yourself. The linked material teaches you how. It even includes the code used by Turing 4.0.5 for Math.Distance and Math.DistancePointLine.

Enjoy!

-----------------------------------
Raku
Fri Feb 23, 2007 5:23 pm

RE:Help!
-----------------------------------
I added the one with Mat.Distance and Math.DistancePointLine and it just give me an error, and pops up the one I added with those two, saying 

Syntax error at 'function', expected 'unit'

O.o

-----------------------------------
Martin
Fri Feb 23, 2007 5:31 pm

RE:Help!
-----------------------------------
Dude, read the title on the _first_ post in this forum.

-----------------------------------
Raku
Fri Feb 23, 2007 5:44 pm

RE:Help!
-----------------------------------
Can't change it now. I was in a hurry. I still need help..>.>

-----------------------------------
Clayton
Fri Feb 23, 2007 5:47 pm

Re: Help!
-----------------------------------
did you delete the keyword unit at the top of the program? are you sure you placed the code inside the module and exported them?

-----------------------------------
Raku
Fri Feb 23, 2007 5:56 pm

RE:Help!
-----------------------------------
I don't know what you mean..O.o

-----------------------------------
Clayton
Fri Feb 23, 2007 6:09 pm

Re: Help!
-----------------------------------
your Math.tu file should have this kind of structure:


unit
module Math
    export Distance, DistancePointLine

    function Distance (x1, y1, x2, y2 : int) : real
        %content
    end Distance

    function DistancePointLine (x1, y1, x2, y2, xp, yp : int) : real
        %more content
    end DistancePointLine

    %any other functions go in here too
end Math

