Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Help!
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Raku




PostPosted: 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
Sponsor
sponsor
Clayton




PostPosted: 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




PostPosted: Fri Feb 23, 2007 5:04 pm   Post subject: RE:Help!

4.04c. It's the same as at school..O.o
Cervantes




PostPosted: 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




PostPosted: 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




PostPosted: Fri Feb 23, 2007 5:31 pm   Post subject: RE:Help!

Dude, read the title on the _first_ post in this forum.
Raku




PostPosted: 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




PostPosted: 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
Sponsor
sponsor
Raku




PostPosted: Fri Feb 23, 2007 5:56 pm   Post subject: RE:Help!

I don't know what you mean..O.o
Clayton




PostPosted: 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
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 10 Posts ]
Jump to:   


Style:  
Search: