Author |
Message |
Raku
|
Posted: Fri Feb 23, 2007 4:58 pm Post subject: 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? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Clayton
|
Posted: Fri Feb 23, 2007 5:02 pm Post subject: 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
|
Posted: Fri Feb 23, 2007 5:04 pm Post subject: RE:Help! |
|
|
4.04c. It's the same as at school..O.o |
|
|
|
|
|
Cervantes
|
Posted: Fri Feb 23, 2007 5:09 pm Post subject: RE:Help! |
|
|
Freakman is right. However, this does not mean you have to get a new version of Turing at home. You can 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
|
Posted: Fri Feb 23, 2007 5:23 pm Post subject: 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
|
Posted: Fri Feb 23, 2007 5:31 pm Post subject: RE:Help! |
|
|
Dude, read the title on the _first_ post in this forum. |
|
|
|
|
|
Raku
|
Posted: Fri Feb 23, 2007 5:44 pm Post subject: RE:Help! |
|
|
Can't change it now. I was in a hurry. I still need help..>.> |
|
|
|
|
|
Clayton
|
Posted: Fri Feb 23, 2007 5:47 pm Post subject: 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? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Raku
|
Posted: Fri Feb 23, 2007 5:56 pm Post subject: RE:Help! |
|
|
I don't know what you mean..O.o |
|
|
|
|
|
Clayton
|
Posted: Fri Feb 23, 2007 6:09 pm Post subject: Re: Help! |
|
|
your Math.tu file should have this kind of structure:
Turing: |
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
|
|
|
|
|
|
|
|