DECLARE (DCL)
Syntax DECLARE kind name
 
Explanation The DECLARE command allows you to create new Logo names, giving a new name a certain type. Logo uses this command internally to create objects of all kinds, like bitmaps, buttons, and turtles. When a new Logo name is declared, Logo creates the name according to its type and stores it into the global workspace.

Currently, Logo knows the following types of names.
 

ARRAY a Logo array
BITMAP a bitmap
BUTTON a pushbutton
CHECKBOX a box with a check mark
EDITBOX a box where you can enter text
EDITOR an editor window
GRAPHICS a Graphics window
LISTBOX a list box
LISTENER the Listener window
OUTPUT an output window
POPUP a pop-up list
RADIOBUTTON a radio button
SCROLLBAR a slider
STATICTEXT a box which displays text
TURTLE a turtle
WINDOW all kinds of windows
WORKSPACE the Logo workspace

When a Logo element is created, it is by default attached to the current Graphics window. A turtle or a button without a window cannot be displayed by Logo. To attach an element to a window, set its WINDOW property to the name of the Graphics window where it should appear.

The NEW command is similar to the DECLARE command.

See also TYPEOF, IS.A, and PPROP.
 

Examples DECLARE "OUTPUT "OUT

A new Output window is created

GPROP "OUT "CHANNEL
Result: 3
(PRINTQUOTE [HI JOE] 3)

The text HI JOE appears in the Output window

TopIndex