<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.sugarlabs.org/index.php?action=history&amp;feed=atom&amp;title=The_Undiscoverable%2FSmalltalk</id>
	<title>The Undiscoverable/Smalltalk - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.sugarlabs.org/index.php?action=history&amp;feed=atom&amp;title=The_Undiscoverable%2FSmalltalk"/>
	<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=The_Undiscoverable/Smalltalk&amp;action=history"/>
	<updated>2026-05-17T10:45:52Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=The_Undiscoverable/Smalltalk&amp;diff=82535&amp;oldid=prev</id>
		<title>Mokurai: New stub</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=The_Undiscoverable/Smalltalk&amp;diff=82535&amp;oldid=prev"/>
		<updated>2012-08-24T22:47:52Z</updated>

		<summary type="html">&lt;p&gt;New stub&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{stub}}&lt;br /&gt;
&lt;br /&gt;
The following code is taken from a tutorial that unfortunately does not include every step the beginner needs to have explained.&lt;br /&gt;
&lt;br /&gt;
[http://static.squeak.org/tutorials/BankAccount.html BankAccount tutorial]&lt;br /&gt;
&lt;br /&gt;
 Object subclass: #NameOfClass&lt;br /&gt;
 &lt;br /&gt;
        instanceVariableNames: &amp;#039;instVarName1 instVarName2&amp;#039;&lt;br /&gt;
 &lt;br /&gt;
        classVariableNames: &amp;#039;ClassVarName1 ClassVarName2&amp;#039;&lt;br /&gt;
 &lt;br /&gt;
        poolDictionaries: &amp;#039;&amp;#039;&lt;br /&gt;
 &lt;br /&gt;
        category: &amp;#039;My Stuff&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 Object subclass: #BankAccount&lt;br /&gt;
 &lt;br /&gt;
        instanceVariableNames: &amp;#039;balance&amp;#039;&lt;br /&gt;
 &lt;br /&gt;
        classVariableNames: &amp;#039;&amp;#039;&lt;br /&gt;
 &lt;br /&gt;
        poolDictionaries: &amp;#039;&amp;#039;&lt;br /&gt;
 &lt;br /&gt;
        category: &amp;#039;My Stuff&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 b _ BankAccount new.&lt;br /&gt;
 b inspect &lt;br /&gt;
 b balance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    message selector and argument names&lt;br /&gt;
        &amp;quot;comment stating purpose of message&amp;quot;&lt;br /&gt;
     &lt;br /&gt;
        | temporary variable names |&lt;br /&gt;
        statements &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 balance&lt;br /&gt;
 &lt;br /&gt;
       &amp;quot;Return the balance&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
       ^ balance&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 initialize&lt;br /&gt;
 &lt;br /&gt;
        balance _ 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 deposit: amount&lt;br /&gt;
 &lt;br /&gt;
        balance _ balance + amount.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 withdraw: amount&lt;br /&gt;
 &lt;br /&gt;
        amount &amp;gt; balance ifTrue: [&lt;br /&gt;
 &lt;br /&gt;
                ^ self inform: &amp;#039;sorry, not enough funds&amp;#039;]. &lt;br /&gt;
 &lt;br /&gt;
        balance _ balance - amount.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Object subclass: #BankAccount&lt;br /&gt;
 &lt;br /&gt;
        instanceVariableNames: &amp;#039;balance history &amp;#039;&lt;br /&gt;
 &lt;br /&gt;
        classVariableNames: &amp;#039;&amp;#039;&lt;br /&gt;
 &lt;br /&gt;
        poolDictionaries: &amp;#039;&amp;#039;&lt;br /&gt;
 &lt;br /&gt;
        category: &amp;#039;My Stuff&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 initialize&lt;br /&gt;
 &lt;br /&gt;
        balance _ 0.&lt;br /&gt;
 &lt;br /&gt;
        history _ OrderedCollection new.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 balance: newBalance&lt;br /&gt;
 &lt;br /&gt;
        balance _ newBalance.&lt;br /&gt;
 &lt;br /&gt;
        history addLast: newBalance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 withdraw: amount&lt;br /&gt;
 &lt;br /&gt;
        amount &amp;gt; balance ifTrue: [&lt;br /&gt;
 &lt;br /&gt;
                ^ self inform: &amp;#039;sorry, not enough funds&amp;#039;]. &lt;br /&gt;
 &lt;br /&gt;
        self balance: balance - amount.&lt;br /&gt;
&lt;br /&gt;
See also [http://web.cecs.pdx.edu/~black/OOP/Tutorial/SqueakLanguageRef.html Squeak Smalltalk: Language Reference]&lt;/div&gt;</summary>
		<author><name>Mokurai</name></author>
	</entry>
</feed>