🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.logo
Article #163

Re: Object Logo (was Re: Logo is based on 1960s...)

#163
From: Gim Mark
Date: Wed, 19 Aug 1992 18:00
30 lines
1592 bytes
>Could you describe how Object Logo extends the language?  I'm curious just
>how it integrates object-oriented programming into Logo.  Does it come up
>with some sort of class abstraction, or does it deal directly with the
>objects themselves?

Here's an example of the use of objects from Object Logo's manual :

? make "scalingTurtle kindof turtle
? ask :scalingTurtle [to forward :steps]
> usual.forward :steps * :scale
> end
FORWARD defined.
? ask :scalingTurtle [to exist]
> usual.exist
> have "scale
> make "scale 1.0
> end
EXIST defined.
? make "fish oneof :scalingTurtle
? ask :fish [make "scale 2.0]

This demonstrates the creation of a subclass (scalingTurtle) from the
base class turtle.  The subclass inherits from its base class, and is
modified by the redefinitions of 'forward' and 'exist'.  At the end,
:fish is an insantiation of scalingTurtle.  It draws lines twice as
long as ordinary turtles in response to the same instructions.

Graham Mark
Los Alamos National Laboratory
(505)667-8147
Technical Details
Message-ID: <1992Aug19.180036.20018@newshost.lanl.gov>
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!mips!sdd.hp.com!caen!hellgate.utah.edu!lanl!beta.lanl.gov!gam
References: <gthomas.712971296@unixg.ubc.ca> <1992Aug5.143104.16220@newshost.lanl.gov> <1992Aug16.173417.3526@usenet.ins.cwru.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.logo
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!mips!sdd.hp.com!caen!hellgate.utah.edu!lanl!beta.lanl.gov!gam
From: gam@beta.lanl.gov (Gim Mark)
Subject: Re: Object Logo (was Re: Logo is based on 1960s...)
Message-ID: <1992Aug19.180036.20018@newshost.lanl.gov>
Sender: news@newshost.lanl.gov
Organization: Los Alamos National Laboratory
References: <gthomas.712971296@unixg.ubc.ca> <1992Aug5.143104.16220@newshost.lanl.gov> <1992Aug16.173417.3526@usenet.ins.cwru.edu>
Date: Wed, 19 Aug 1992 18:00:36 GMT
Lines: 33