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

Username:   Password: 
 RegisterRegister   
 Dont Know Why This is Wrong
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Bleaych




PostPosted: Sun Jan 18, 2009 3:10 pm   Post subject: Dont Know Why This is Wrong

Hi, I am Attempting to make a Thick Line move from left to right to the midddle of the screen. I entered This code and it does not show the arm at all, can somebody offer any suggestions as to why it is doing this?

Turing:
var arm : int


process movingarm
arm:=160
for counte:160..400
arm:=arm+1
Draw.ThickLine (1, 200,arm, 200, 30, 49)
delay (50)
Draw.ThickLine (1, 200,arm, 200, 30, 0)
end for
end movingarm


Mod Edit: Fixed the syntax tags
code:
[syntax="turing"]Your code actually goes in here[/syntax]
Sponsor
Sponsor
Sponsor
sponsor
DanielG




PostPosted: Sun Jan 18, 2009 3:19 pm   Post subject: RE:Dont Know Why This is Wrong

never use process, at least not in turing, For anything other then music.
for that process to work you need to call it by using
code:

fork movingarm
Bleaych




PostPosted: Sun Jan 18, 2009 4:01 pm   Post subject: RE:Dont Know Why This is Wrong

thank you for the help it is working now
andrew.




PostPosted: Sun Jan 18, 2009 5:39 pm   Post subject: RE:Dont Know Why This is Wrong

Don't use processes in Turing. Only use it for background music. Processes are extremely buggy and unreliable in Turing. Why not just put it in a procedure instead?

e.g.
Turing:
var arm : int

proc movingArm
arm:=160
for counte:160..400
arm:=arm+1
Draw.ThickLine (1, 200,arm, 200, 30, 49)
delay (50)
Draw.ThickLine (1, 200,arm, 200, 30, 0)
end for
end movingArm

movingArm
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  [ 4 Posts ]
Jump to:   


Style:  
Search: