-
May 14th, 2023, 12:25 PM
#41
Thread Starter
Lively Member
Re: Visual Small Basic v1.8.5 for kids and beginners
 Originally Posted by Peter Swinkels
a manual would be useful. With a quick reference guide.
This is the sVB full reference book
Attachment 187643
-
May 21st, 2023, 01:58 PM
#42
Thread Starter
Lively Member
Re: Small Visual Basic: an educational language for kids and beginners
In sVB v2.8.4, you can use the turtle to fill an area, by calling the CreateFigure and FillFigure methods.
X = Turtle.X
Y = Turtle.Y
Turtle.CreateFigure()
Turtle.Move(200)
Turtle.TurnRight()
Turtle.Move(200)
Turtle.TurnRight()
Turtle.Move(200)
Turtle.TurnRight()
Turtle.Move(200)
Turtle.FillFigure()
Turtle.CreateFigure()
Turtle.TurnLeft()
Turtle.Move(200)
Turtle.MoveTo(200, 200)
Turtle.MoveTo(350, 200)
Turtle.MoveTo(X, Y)
GraphicsWindow.BrushColor = Colors.Red
Turtle.FillFigure()
-
Jul 9th, 2023, 01:43 PM
#43
Thread Starter
Lively Member
Re: Small Visual Basic: an educational language for kids and beginners
What's new in the latest sVB update:
* you can set the Turtle.UseAnimation property to false, to force its Move, MoveTo and Turn methods to call the DirectMove, DirectMoveTo and DirectTurn methods to avoid using animation.
* If the sVB crashed, it will restore last unsaved projects when you reopens it.
* sVB now has the Evaluator lib, which allows you to evaluate mathematical expressions at runtime:
• Use the Expression Property to set the mathematical expression. The expression can contain only one input variable named X.
• Use the Evaluate method to calculate the value of the expression at the given value of x.
Example:
Code:
Evaluator.Expression = "(x^2 + 1) * Abs(-x + 5) / 4"
TextWindow.WriteLines({
Evaluator.Evaluate(-1),
Evaluator.Evaluate(0),
Evaluator.Evaluate(37)
})
You can allow the user to provide any expression he wants, so you can evaluate it at some values. You can use this to create an application that draws functions provided by the user. This is exactly what the "Draw Functions" project in the samples folder does, so please take a look at.
-
Jul 9th, 2023, 03:45 PM
#44
Re: Small Visual Basic: an educational language for kids and beginners
Ah yes the turtle... I think it was either K or 1st grade we had our first computer class, where we played with LOGO on some green screened Macs. This looks a lot more engaging; my interest in coding wasn't really piqued until middle school with programming my calculator, making web pages, and AOL proggies. Keep up the good work
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|