[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bugs-dist
Subject: [Bug 89585] New: some examples have typo
From: Keith Gross <grossk () charter ! net>
Date: 2004-09-15 17:29:00
Message-ID: 20040915192852.89585.grossk () charter ! net
[Download RAW message or body]
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
http://bugs.kde.org/show_bug.cgi?id=89585
Summary: some examples have typo
Product: kturtle
Version: unspecified
Platform: Gentoo Packages
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: NOR
Component: general
AssignedTo: kde showroommama nl
ReportedBy: grossk charter net
Version: (using KDE KDE 3.3.0)
Installed from: Gentoo Packages
Compiler: 3.3.4
OS: Linux
The two examples in the help section "Create your own commands" have syntax errors. \
They're easy enough to track down but confusing to a 10 year trying to learn. Below \
are the corrected versions. The first was missing the parens in the calls to the \
circle method. The second was returning a incorrect result because a string was \
passed instead of a number. An extra multily by 1 forced the conversion to a number.
======================
learn circle (x) [
repeat 36 [
forward x
turnleft 10
]
]
go 30,30
circle(20)
go 40,40
circle(50)
====================
reset
learn multiplyBySelf (n) [
r = n * 1
r = r * n
return r
]
i = inputwindow "Please enter a number and press OK"
print i + " multiplied by itself is: " + multiplyBySelf (i)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic