none
problem with turtle RRS feed

  • Question

  • I install smallbasic witch is very great on my computer and framework .NET 3.5 to.
    I type this code :

    Turtle.Show()
    Turtle.Move(100)
    Turtle.TurnRight()
    Turtle.Move(100)
    Turtle.TurnRight()
    Turtle.Move(100)
    Turtle.TurnRight()
    Turtle.Move(100)
    Turtle.TurnRight()

    The result is the turtle go up for 100 pixels then turn right go 100 pixels then turn right BUT go out  on the right  of the window, very fast.

    I use vista familial premium éditon, service pack 1.

    Have you any idear about this problem ?
    Without solving this problem i could not use the turtle with children in a school and i hope any help.

    Thank you very much
    Frederic
    Thursday, November 6, 2008 10:29 AM

Answers

  • I get it too, after the very first turn in the circle sample or after the second turn in the square sample. Running the US version of Vista Ultimate.

    This turns out to be related to the setting of the decimal comma (here in the Netherlands) rather than the decimal point (as is common in the US). Switching that setting fixes it.
    Thursday, November 6, 2008 8:52 PM
  • And Salem5 is going to safe the day:
    The problem is like so often because some Nations use .(dot) instead ,(comma) and vice versa, and some Programs get irritiated by that. I've assumed this for a while (i'm German), and now since the frenchman sharing the same problem too, i've tried something:

    Setting in the regions options the dot as Decimal character, instead of comma. 

    But to be honest, this is a rather temporary Solution, This can give me errors in other sectors, especially by using Software which are depending on a german Setting.

    Also, I like that Textbox in here, is there an ASP.NET Control for that? :P 
    just joking.
    • Proposed as answer by Omar Aj Friday, November 7, 2008 12:04 PM
    • Marked as answer by Vijaye RajiModerator Saturday, November 8, 2008 5:02 PM
    Friday, November 7, 2008 11:07 AM
  • well as I notice
    d if you are like trying to do some parallel line then it gets messed up on locales where comma is , not .

    for me crashes pretty badly but when I like change 2nd TurnRight to TurnLeft it works but yea... then it turns to opposite direction so I think developes have to look over that part...
    Turtle.PenDown() 
    Turtle.Move(50) 
    Turtle.PenUp() 
    Turtle.TurnRight() 
    Turtle.Move(50) 
    Turtle.TurnRight() 
    Turtle.PenDown() 
    Turtle.Move(50) 
    Turtle.PenUp()
    Well, I tested a bit and found out that after

    Turtle.Move(50)
    Turtle.TurnRight()
    Turtle.Move(50)

    piece of code you can only Turn(-90) or Turn(0) or it will get messed up
    • Edited by Krisavi Monday, November 17, 2008 11:46 PM
    • Proposed as answer by Krisavi Monday, November 17, 2008 11:47 PM
    • Marked as answer by Vijaye RajiModerator Tuesday, November 18, 2008 3:22 AM
    Monday, November 17, 2008 11:39 PM

All replies

  • I'm not sure what's wrong, Frederic.  When I run your program, I get the following output.

    Is it possible that you're running a non-English OS?  I've heard there are issues with that, but this one seems odd. 

    1. Are you able to repro this consistently?
    2. Does the turtle move erratically only after the first two moves?

    These will help me track down the issue.
    Thursday, November 6, 2008 2:12 PM
    Moderator

  • Yes i run a French OS

    1)
    I repro with this code :

    Turtle.Show()

    For i = 1 To 4
       Turtle.Move(100)
       Turtle.TurnRight()
    EndFor

    2)
    Yes, the turtle crash only after the  first two moves, just after the second turn right, at this moment the program crash.


    Thursday, November 6, 2008 4:43 PM
  •  Hello,

    I've the same problem.

    And I have a French Enterprise Vista too...
    Thursday, November 6, 2008 4:51 PM
  • I get it too, after the very first turn in the circle sample or after the second turn in the square sample. Running the US version of Vista Ultimate.

    This turns out to be related to the setting of the decimal comma (here in the Netherlands) rather than the decimal point (as is common in the US). Switching that setting fixes it.
    Thursday, November 6, 2008 8:52 PM
  • Thanks Steven.  I've filed a bug on this and will fix it for our next release (in a couple months).
    Friday, November 7, 2008 1:07 AM
    Moderator
  • And Salem5 is going to safe the day:
    The problem is like so often because some Nations use .(dot) instead ,(comma) and vice versa, and some Programs get irritiated by that. I've assumed this for a while (i'm German), and now since the frenchman sharing the same problem too, i've tried something:

    Setting in the regions options the dot as Decimal character, instead of comma. 

    But to be honest, this is a rather temporary Solution, This can give me errors in other sectors, especially by using Software which are depending on a german Setting.

    Also, I like that Textbox in here, is there an ASP.NET Control for that? :P 
    just joking.
    • Proposed as answer by Omar Aj Friday, November 7, 2008 12:04 PM
    • Marked as answer by Vijaye RajiModerator Saturday, November 8, 2008 5:02 PM
    Friday, November 7, 2008 11:07 AM
  • Whoops, don found out already, feeling stupid now.
    Friday, November 7, 2008 12:05 PM
  • The error that Fredrealloc means I recorded in this video, so when i changed to en-US, everything works.

    TextWindow.WriteLine("Rafael Valdés")
    Monday, November 10, 2008 8:44 PM
  • Thanks for the video, Rafael.  That helps.
    Tuesday, November 11, 2008 2:49 AM
    Moderator
  • Hi,

    I have the same problem with a XP-Prof. SP2 de-DE key layout. It seems a problem with
    different languages.

    Regards, Frank
    • Edited by BeyerF Friday, November 14, 2008 9:02 AM
    Friday, November 14, 2008 8:19 AM
  • Hi, I found bug in that code:

    Turtle.Show()
    Turtle.Move(100)
    Turtle.TurnLeft()
    Turtle.Move(50)
    Turtle.TurnLeft()
    Turtle.Move(10)
    Turtle.Hide()

    It will crash on line with Turtle.Move(10) with error message that program is not responding. I am running on Windows Vista Bussines x64 CZ.
    • Edited by Nidzo Monday, November 17, 2008 7:50 PM
    Monday, November 17, 2008 7:49 PM
  • well as I notice
    d if you are like trying to do some parallel line then it gets messed up on locales where comma is , not .

    for me crashes pretty badly but when I like change 2nd TurnRight to TurnLeft it works but yea... then it turns to opposite direction so I think developes have to look over that part...
    Turtle.PenDown() 
    Turtle.Move(50) 
    Turtle.PenUp() 
    Turtle.TurnRight() 
    Turtle.Move(50) 
    Turtle.TurnRight() 
    Turtle.PenDown() 
    Turtle.Move(50) 
    Turtle.PenUp()
    Well, I tested a bit and found out that after

    Turtle.Move(50)
    Turtle.TurnRight()
    Turtle.Move(50)

    piece of code you can only Turn(-90) or Turn(0) or it will get messed up
    • Edited by Krisavi Monday, November 17, 2008 11:46 PM
    • Proposed as answer by Krisavi Monday, November 17, 2008 11:47 PM
    • Marked as answer by Vijaye RajiModerator Tuesday, November 18, 2008 3:22 AM
    Monday, November 17, 2008 11:39 PM
  • I have had no problems with my turtle.  In fact here is a program to draw an oval:

    'MAKE AN OVAL PROGRAM
    'PROGRAMMER: GREGORY LYONS
    GraphicsWindow.Title = "Oval"
    GraphicsWindow.Top = 100
    GraphicsWindow.Left = 100
    GraphicsWindow.Height = 400
    GraphicsWindow.Width = 600
    GraphicsWindow.BackgroundColor = "Black"
    GraphicsWindow.PenColor = "SlateGray"
    GraphicsWindow.Show()
    Turtle.X = 250
    Turtle.Y = 100
    Turtle.TurnRight()
    Turtle.Show()
    Turtle.Speed = 10
    Turtle.Turn(1)
    Turtle.Move(1)
    For oval = 1 To 45
      Turtle.Turn(1)
      Turtle.Move(1)
      Turtle.Move(1)
    EndFor
    For oval = 1 To 60
      Turtle.Turn(1.5)
      Turtle.Move(1)
    EndFor
    For oval = 1 To 45
      Turtle.Turn(1)
      Turtle.Move(1)
      Turtle.Move(1)
    EndFor
    For oval = 1 To 45
      Turtle.Turn(1)
      Turtle.Move(1)
      Turtle.Move(1)
    EndFor
    For oval = 1 To 60
      Turtle.Turn(1.5)
      Turtle.Move(1)
    EndFor
    For oval = 1 To 45
      Turtle.Turn(1)
      Turtle.Move(1)
      Turtle.Move(1)
    EndFor
    Turtle.Hide()
    Program.Delay(4000)
    Program.End()

    Saturday, February 14, 2015 4:41 AM
  • Always read the previous answers before posting a new one, and be sure you're not posting 7 years later.

    @rvc

    Saturday, February 14, 2015 11:44 AM