PC Logo入门指南

PC Logo是一款适合青少年学习的编程语言,通过控制小海龟进行图形绘制。本文介绍了Logo的基本语句,展示了如何绘制几何图形,并探讨了其语言特点和编程原理。同时,提供了下载链接供读者实践。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一.Logo简介

PC Logo 又称Logo小海龟,是一种面向青少年的编程语言,通过程序控制一个小海龟(箭头)移动并进行绘图。

二.基本语句

DRAW - 清屏、海龟、画布颜色、海龟颜色恢复至初始设置
CLEAN 清屏,海龟、笔色、画布颜色、海龟位置角度不变
CLEARSCREEN CS (CS简写清屏)清屏,海龟回到初始位置,笔色、画布颜色不变
CLEARTEXT CT 清除命令区
FORWARD FD 前进 (FD简写前进)
BACK BK 后退 (BK简写后退)
RIGHT RT 右转 (RT简写右转)
LEFT LT 左转 (LT简写左转)
PENUP PU 抬笔(PU简写抬笔)
PENDOWN PD 落笔(PD简写落笔)
HIDETURTLE HT 藏龟(HT简写藏龟)
SHOWTURTLE ST 显龟
CLEARSCREEN CS 清屏
HOME - 回原点
REPEAT - 重复
SPLITSCREEN SS 图文混合屏
FULLSCREEN FS 全图形屏
TEXTSCREEN TS 全文字屏
NODRAW ND 全文字屏、清屏
WRAP - 环绕状态
WINDOW - 窗口状态
FENCE - 围栏状态
SHOW - 屏幕输出
TT - 在画图区显示文字
TO……END - 过程头、尾
IF…THEN…ELSE
PAUSE
CONTINUE CO
EDIT ALL - 进入编辑部
STOP -
TOPLEVEL -
SETPC - 设置画笔颜色
SETBG - 设置屏幕底色
FILL-填色
坐标作图
SETX - 指定海龟横向位置
SETY - 指定海龟纵向位置
SETXY - 指定海龟任意位置
SETHEADING SETH - 指定海龟方向
XCOR - 显示海龟当前位置的X坐标
YCOR - 显示海龟当前位置的Y坐标
GETXY - 显示海龟当前位置的X,Y坐标
HEADING - 显示海龟指向角度
文件管理
POTS - 显示工作区内所有过程的标题
POPS(PO ALL) - 显示工作区内所有过程的内容
PRINTOUT PO 显示工作区内过程的内容
ERASE(ER ALL) ER 删除工作区中的过程
DIRECTORY DIR 显示磁盘文件目录
DISK - 显示当前盘
SETDISK - 设置当前盘
SAVE - 把程序存盘
LOAD - 读程序文件
SAVEPIC - 图形存盘
LOADPIC - 读图形文件
DELETE - 删除文件
RENAME REN 文件改名
数值计算
PRINT PR 换行打印
TYPE - 同行打印
SETCURSOR - 打印格
接触过 LOGO 编程语言的人应该都知道这款软件,这也是笔者接触的第一门编程语言,怀念之情难以言表。特将此资源拿出来与大家共享。 注:资源包中包含英文原版和汉化补丁。 以下是原版软件的 README: PC Logo for Windows This file contains the latest information about PC Logo for Windows. PC Logo for Windows installation automatically installs four example programs. These are: Shape Editor The PC Logo for Windows shape editor provides an easy and convenient way to change the turtle shape and save your new shapes as files. The shape editor is written in Logo and also provides an example of using Logo to create a program complete with windows, dialog boxes, buttons, and help. To use the shape editor, load the SHED.LGO file from within Logo or double-click the Shape Editor icon in the Program Manager. Music The MUSIC.LGO file provides an example of using Logo to play music. To listen to the music, load the MUSIC.LGO file from within Logo or double-click the Music icon in the Program Manager. Follow the instructions that appear on the screen. Squiral The squiral program is an example of a simple Logo procedure that uses recursion to create colorful and complex graphics designs. To see the squirals, load the SQUIRAL.LGO file from within Logo or double-click the Squiral icon in the Program Manager. Shapes The shapes program illustrates using multiple turtles in Logo with different shapes for each of them. To see the different shapes, load the SHAPES.LGO file from within Logo or double-click the Shapes icon in the Program Manager. More information about Logo Many books have been published about teaching Logo and using it to teach a variety of other subjects. Harvard Associates has gathered the best of these books into the PC Logo Library. The PC Logo Library catalog accompanies each copy of PC Logo for Windows. Contact Harvard Associates if you would like a copy of the catalog or wish to order one or more of the selections in the PC Logo Library. Harvard Associates, Inc. 10 Holworthy Street Cambridge, MA 02138 U.S.A. phone: (617) 492-0660 fax: (617) 492-4610 CompuServe: 70312,243 Internet: 70312.243@compuserve.com If you are contacting Harvard Associates about a Logo programming problem, please use either fax, mail, or electronic mail and include a written example of a Logo procedure that illustrates the problem.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值