BB___GO

=GO= toc

Description
> In a graphics window or graphicbox, GO moves the pen from the current position a distance D and in the direction the pen is pointing. If the pen is up, no line is drawn.

Syntax
//This command is NOT case sensitive//. Using literal values: Using variable values:
 * 1)  - in graphics window
 * 2)  - in graphicbox

Hints

 * //**Go vs Goto vs Line.**// Go moves the pen a certain distance. Goto moves the pen to a certain x y position. Both draw a line from the current position if the pen is down. Line requires both the //starting// and ending position to be specified.

Here is a list of commands that affect the pen position or status: down go goto home north place posxy set size turn up

Example
An example of the command in a graphics window. code format="lb" nomainwin WindowWidth=400 WindowHeight=300

open "Command Demo" for graphics_nsb_nf as #g #g "trapclose [quit]"

'put pen down #g "down; home" 'set D distance D=100 'draw a line D long going north #g "go "; D   wait

[quit] close #g end code

An example of the command in a graphicbox. code format="lb" nomainwin WindowWidth=400 WindowHeight=300

graphicbox #g.gb 2, 2, 390, 270 open "Command Demo" for graphics_nsb_nf as #g #g "trapclose [quit]"

'put pen down #g.gb "down; home" #g.gb "size 4; color red; set; size 1; color black" 'draw a 100 px line north #g.gb "go 100" wait

[quit] close #g end code

Useful Functions
code format="lb" Place a useful function using this keyword here code