Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

프로그래밍잔치/SmallTalk: Difference between revisions

From ZeroWiki
imported>smksyj
No edit summary
 
(Repair batch-0008 pages from live compare)
 
Line 21: Line 21:
  printGuGu
  printGuGu
  2 to: 9 do:
  2 to: 9 do:
  [
  [
  :i | Transcript cr; show: i asString, 'dan'.
  :i | Transcript cr; show: i asString, 'dan'.
   
   
  1 to: 9 do:
  1 to: 9 do:
  [
  [
  :j | Transcript cr; show: i asString, ' * ', j asString, ' = ', (i*j) asString.
  :j | Transcript cr; show: i asString, ' * ', j asString, ' = ', (i*j) asString.
  ].
  ].
  ].
  ].
----
----
  gugu := GuGuDan new.
  gugu := GuGuDan new.
  gugu printGuGu.
  gugu printGuGu.

Latest revision as of 01:40, 27 March 2026

Hello World

Object subclass: #HelloWorld
	instanceVariableNames: 
	classVariableNames: 
	poolDictionaries: 
	category: 'HelloWorld'

printHello
	Transcript show: 'Hello World'.

hello := HelloWorld new.
hello printHello.

구구단

Object subclass: #GuGuDan
	instanceVariableNames: 
	classVariableNames: 
	poolDictionaries: 
	category: 'GuGuDan

printGuGu
	2 to: 9 do:
	[
		:i | Transcript cr; show: i asString, 'dan'.

		1 to: 9 do:
		[
			:j | Transcript cr; show: i asString, ' * ', j asString, ' = ', (i*j) asString.
		].
	].

gugu := GuGuDan new.
gugu printGuGu.