
-----------------------------------
Bleaych
Sun Jan 18, 2009 3:10 pm

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? 

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[syntax="turing"]Your code actually goes in here[/syntax]

-----------------------------------
DanielG
Sun Jan 18, 2009 3:19 pm

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 

fork movingarm


-----------------------------------
Bleaych
Sun Jan 18, 2009 4:01 pm

RE:Dont Know Why This is Wrong
-----------------------------------
thank you for the help it is working now

-----------------------------------
andrew.
Sun Jan 18, 2009 5:39 pm

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.
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

