-
Notifications
You must be signed in to change notification settings - Fork 1
/
Simula_Smalltalk.mm
713 lines (700 loc) · 29.6 KB
/
Simula_Smalltalk.mm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
<map version="1.0.1">
<!-- To view this file, download free mind mapping software FreeMind from http://freemind.sourceforge.net -->
<node CREATED="1417705975504" ID="ID_1187244787" MODIFIED="1417706001368" TEXT="Simula_Smalltalk">
<node CREATED="1417706003283" ID="ID_810770112" MODIFIED="1417706033784" POSITION="right" TEXT="Concepts in programming lang"/>
<node CREATED="1417706057880" ID="ID_1877680243" MODIFIED="1417706561344" POSITION="right" TEXT="Simula">
<node CREATED="1417706123650" ID="ID_1595633856" MODIFIED="1417706158852" TEXT="authors">
<node CREATED="1417706077449" ID="ID_1373003492" MODIFIED="1417706128007" TEXT="O.J.Dahl"/>
<node CREATED="1417706108669" ID="ID_1359614362" MODIFIED="1417706602630" TEXT="K.Nygaard">
<icon BUILTIN="bookmark"/>
<node CREATED="1417706846676" ID="ID_1016197817" MODIFIED="1417706874943" TEXT="2001 ACM Turing Award"/>
<node CREATED="1417706879113" ID="ID_416200857" MODIFIED="1417706898686" TEXT="IEEE John Von Neumann Medal"/>
</node>
</node>
<node CREATED="1417706147118" ID="ID_1455447685" MODIFIED="1417706194756" TEXT="Norwegian Computing Center,Oslo"/>
<node CREATED="1417706130406" ID="ID_1099090677" MODIFIED="1417706208127" TEXT="1960s"/>
<node CREATED="1417706215597" ID="ID_841021104" MODIFIED="1417706343181" TEXT="first oop lang, extremely influential, impact/inspire Smalltalk,C++"/>
<node CREATED="1417706282924" FOLDED="true" ID="ID_1188008827" MODIFIED="1417706463299" TEXT="features">
<node CREATED="1417706351797" ID="ID_1547259282" MODIFIED="1417706367802" TEXT="classes"/>
<node CREATED="1417706368526" ID="ID_34116335" MODIFIED="1417706372914" TEXT="objects"/>
<node CREATED="1417706373225" ID="ID_789159699" MODIFIED="1417706381712" TEXT="dynamic lookup"/>
<node CREATED="1417706381965" ID="ID_1360831447" MODIFIED="1417706384420" TEXT="subtyping"/>
<node CREATED="1417706384729" ID="ID_223404013" MODIFIED="1417706393778" TEXT="inheritance"/>
</node>
<node CREATED="1417706463761" ID="ID_1094285356" MODIFIED="1417706470079" TEXT="Simula67"/>
<node CREATED="1417706569688" ID="ID_610562930" MODIFIED="1417706588475" TEXT="event-based simulation"/>
</node>
<node CREATED="1417706415688" FOLDED="true" ID="ID_138708314" MODIFIED="1417931411729" POSITION="right" TEXT="Smalltalk">
<node CREATED="1417706482448" ID="ID_1129632186" MODIFIED="1417706487214" TEXT="authors">
<node CREATED="1417706488332" ID="ID_1121245582" MODIFIED="1417706492125" TEXT="Alan Kay"/>
</node>
<node CREATED="1417706396194" ID="ID_983813122" MODIFIED="1417706432600" TEXT="Xerox Palo Alto Research Center (PARC)"/>
</node>
<node CREATED="1417706967741" FOLDED="true" ID="ID_1238688185" MODIFIED="1417931410326" POSITION="right" TEXT="Simula OOP">
<node CREATED="1417706981573" FOLDED="true" ID="ID_1770589914" MODIFIED="1417707008119" TEXT="general-purpose object-oriented language">
<node CREATED="1417706975825" ID="ID_1621956183" MODIFIED="1417707001373" TEXT="Apparently, when someone once asserted that Simula was not a general-purpose language, Nygaard’s response was that, because Simula had all of the features of Fortran and Algol, and more, what would he need to remove before Simula could be called general purpose?"/>
</node>
<node CREATED="1417707010442" ID="ID_1894435652" MODIFIED="1417707134372" TEXT="Algol 60">
<node CREATED="1417707135557" ID="ID_1994103046" MODIFIED="1417707136557" TEXT="+">
<node CREATED="1417707158993" ID="ID_939841429" MODIFIED="1417707158993" TEXT="class concepts and reference variables (pointers to objects),"/>
<node CREATED="1417707158995" MODIFIED="1417707158995" TEXT="pass-by-reference,"/>
<node CREATED="1417707158996" MODIFIED="1417707158996" TEXT="char, text, and input–output features,"/>
<node CREATED="1417707158997" MODIFIED="1417707158997" TEXT="coroutines, a mechanism for writing concurrent programs."/>
</node>
<node CREATED="1417707137593" ID="ID_1934099917" MODIFIED="1417707138379" TEXT="-">
<node CREATED="1417707230586" ID="ID_1136749127" MODIFIED="1417707237444" TEXT="changed default parameter passing mechanism from pass-by-name to a com-bination of pass-by-value and pass-by-result,"/>
<node CREATED="1417707230590" ID="ID_1158474335" MODIFIED="1417707230590" TEXT="some initialization requirements on variables,"/>
<node CREATED="1417707230591" MODIFIED="1417707230591" TEXT="own variables (which are analogous to C static variables),"/>
<node CREATED="1417707230592" MODIFIED="1417707230592" TEXT="the Algol 60 string type (in favor of a text type)."/>
</node>
</node>
</node>
<node CREATED="1417876555846" ID="ID_448861788" MODIFIED="1462712351312" POSITION="right" TEXT="Smalltalk basic">
<node CREATED="1417929756715" FOLDED="true" ID="ID_1352033448" MODIFIED="1419081803625" TEXT="literals">
<node CREATED="1417876566202" ID="ID_1051136594" MODIFIED="1417929764954" TEXT=""this is a comment""/>
<node CREATED="1417876633215" ID="ID_896686784" MODIFIED="1417929764951" TEXT="'this is a string'"/>
<node CREATED="1417876659675" ID="ID_1790905620" MODIFIED="1417929764949" TEXT="'this is a string contains single quote('') '"/>
<node CREATED="1417876720016" ID="ID_1379560093" MODIFIED="1417929764947" TEXT="#'this is a symbol'"/>
<node CREATED="1417876788139" ID="ID_182834057" MODIFIED="1417929764945" TEXT="#symbol"/>
<node CREATED="1417876769509" ID="ID_1615169539" MODIFIED="1417929764942" TEXT="#(1 2 3 4 5) "array""/>
<node CREATED="1417876799689" ID="ID_1089260302" MODIFIED="1417929764940" TEXT="'string1','string2'"/>
</node>
<node CREATED="1417931428851" ID="ID_11655537" MODIFIED="1417931450822" TEXT="everything is object except variables"/>
<node CREATED="1417930019754" ID="ID_1107372019" MODIFIED="1417932065112" TEXT="predef/preclude/built-in/lib"/>
<node CREATED="1417929772557" FOLDED="true" ID="ID_480715121" MODIFIED="1419081802472" TEXT=":= == = [] || ^">
<node CREATED="1417929838960" ID="ID_1389757480" MODIFIED="1417929880701" TEXT=":= "assigment", <- in early times"/>
<node CREATED="1417929882140" ID="ID_819357172" MODIFIED="1417929894590" TEXT="= ''deep cmp""/>
<node CREATED="1417929895012" ID="ID_634347760" MODIFIED="1417929925909" TEXT="== "shallow cmp""/>
<node CREATED="1417929928797" ID="ID_1472471684" MODIFIED="1417929965514" TEXT="| x y z| "instance variable declarations""/>
<node CREATED="1417929969212" ID="ID_886360456" MODIFIED="1417929973842" TEXT="^ "return""/>
</node>
<node CREATED="1417930126953" FOLDED="true" ID="ID_860379927" MODIFIED="1419081798992" TEXT="separator : ; . ,">
<node CREATED="1417930142356" ID="ID_431246131" MODIFIED="1417930151262" TEXT="; message cascading"/>
<node CREATED="1417930151530" ID="ID_36823828" MODIFIED="1417930174122" TEXT=". statement terminator "/>
<node CREATED="1417930174995" ID="ID_1638955569" MODIFIED="1417930194929" TEXT=": keyword selector separator"/>
<node CREATED="1417930195526" ID="ID_1634277836" MODIFIED="1417930212325" TEXT=", string concatenation"/>
</node>
<node CREATED="1417929954680" FOLDED="true" ID="ID_1494192232" MODIFIED="1419081795132" TEXT="[BlockClosure] is object">
<icon BUILTIN="button_ok"/>
<node CREATED="1417930406927" FOLDED="true" ID="ID_436791714" MODIFIED="1419081105949" TEXT=" [:x :y :z|x+y+z] value:1 value:2 value:3 ">
<node CREATED="1417932116418" ID="ID_1010585343" MODIFIED="1417932216146" TEXT="(\x y z -> x + y + z) 1 2 3 -- in Haskell "/>
<node CREATED="1417932136792" ID="ID_1858310609" MODIFIED="1417932341212" TEXT="((_:Int)+(_:Int)+(_:Int))(1,2,3) -- in Scala"/>
</node>
<node CREATED="1417930438896" ID="ID_1530545190" MODIFIED="1419081114319" TEXT="|a| a:=[1+2+3]. a value">
<node CREATED="1417932522780" ID="ID_116667685" MODIFIED="1417932605777" TEXT="(\_->1 + 2 +3) Nothing -- in Haskell"/>
<node CREATED="1417932505209" ID="ID_862619761" MODIFIED="1417932522112" TEXT="(()=>1+2+3)() -- in Scala"/>
</node>
<node CREATED="1417931111592" ID="ID_1323181256" MODIFIED="1417931112624" TEXT="fib:=[|a0 a1 | a0:=0.a1:=1. [|t| t:=a1. a1:=a0 + a1. a0:=t] ] "/>
<node CREATED="1417931118177" ID="ID_779786662" MODIFIED="1417931127096" TEXT="F:=fib value"/>
<node CREATED="1417931127872" ID="ID_527594811" MODIFIED="1417931146811" TEXT="F value. F value .F value"/>
</node>
<node CREATED="1417923472115" FOLDED="true" ID="ID_393669525" MODIFIED="1419081796641" TEXT="receiver message">
<icon BUILTIN="button_ok"/>
<node CREATED="1417923496111" ID="ID_1021123963" MODIFIED="1417923678402" TEXT="receiver: object"/>
<node CREATED="1417923584219" ID="ID_1032307884" MODIFIED="1419081134565" TEXT="message: selector + arguments">
<node CREATED="1417923758863" ID="ID_989459719" MODIFIED="1417923761880" TEXT="selector">
<node CREATED="1417923765175" ID="ID_1300302696" MODIFIED="1417923769532" TEXT="unary">
<node CREATED="1417929737862" ID="ID_13449569" MODIFIED="1417929742930" TEXT="size"/>
</node>
<node CREATED="1417923769768" ID="ID_739944663" MODIFIED="1419081140207" TEXT="binary">
<node CREATED="1417929690782" ID="ID_1778219611" MODIFIED="1417929698287" TEXT="[^\w]{1,2}">
<node CREATED="1417929703838" ID="ID_149186777" MODIFIED="1417929704986" TEXT="+"/>
<node CREATED="1417929705491" ID="ID_1996867552" MODIFIED="1417929706590" TEXT="_"/>
</node>
</node>
<node CREATED="1417923772622" ID="ID_544014614" MODIFIED="1417923778517" TEXT="keyword">
<node CREATED="1417929716294" ID="ID_499588433" MODIFIED="1417929726074" TEXT="at:"/>
<node CREATED="1417929727035" ID="ID_671923719" MODIFIED="1417929734460" TEXT="copyFrom:to"/>
</node>
</node>
</node>
<node CREATED="1417923584987" ID="ID_1017554770" MODIFIED="1417925767030" TEXT="message chaining">
<node CREATED="1417924051444" ID="ID_1149198964" MODIFIED="1417924216778" TEXT="'3.14' asNumber truncated negated printString"/>
<node CREATED="1417924870185" ID="ID_77110266" MODIFIED="1417924871480" TEXT="'ISBN 0-262-15012-3' copyFrom:'ISBN 0-262-1' size to:'ISBN 0-262-1' size + 4"/>
</node>
<node CREATED="1417923710926" FOLDED="true" ID="ID_964602561" MODIFIED="1419081313004" TEXT="message cascading">
<node CREATED="1417929627870" ID="ID_118345135" MODIFIED="1417929634897">
<richcontent TYPE="NODE"><html>
<head>
</head>
<body>
<p>
Object subclass:Employee [
</p>
<p>
    |name age email|
</p>
<p>
    setName: n [ name:=n]
</p>
<p>
    getName [^name]
</p>
<p>
    setAge: a [ age:=a]
</p>
<p>
    getAge [^age]
</p>
<p>
    setEmail:e [ email:=e]
</p>
<p>
    getEmail [^email]
</p>
<p>
    printString [
</p>
<p>
       ^'Employee: name=',name,
</p>
<p>
        '; age=',age printString,
</p>
<p>
        '; email=',email
</p>
<p>
    ]
</p>
<p>
</p>
<p>
]
</p>
<p>
</p>
<p>
|emp1|
</p>
<p>
emp1 := Employee new.
</p>
<p>
emp1 setName:'ranpanf';
</p>
<p>
     setAge:26;
</p>
<p>
     setEmail:'[email protected]'.
</p>
<p>
Transcript show: emp1 printString ;cr.
</p>
</body>
</html></richcontent>
</node>
</node>
<node CREATED="1417923752071" ID="ID_324216610" MODIFIED="1417923755787" TEXT="message precedence">
<node CREATED="1417923795610" ID="ID_923576266" MODIFIED="1417923904626" TEXT="1.() > unary > binary > keyword"/>
<node CREATED="1417923907899" ID="ID_723389138" MODIFIED="1417923981288" TEXT="2. left -> right "/>
</node>
</node>
<node CREATED="1417929979295" FOLDED="true" ID="ID_185114892" MODIFIED="1419081781264" TEXT="oop">
<icon BUILTIN="button_ok"/>
<node CREATED="1417932711174" ID="ID_1114281304" MODIFIED="1419081664814" TEXT="abstract">
<node CREATED="1417936715411" ID="ID_226249918" MODIFIED="1417936718759" TEXT="why abstract">
<node CREATED="1417933657265" ID="ID_385413173" MODIFIED="1417936720822" TEXT="uniform interface restricted by supertypes and polymorphous behavior depends on subtypes"/>
<node CREATED="1417933819089" ID="ID_247540862" MODIFIED="1419081697057" TEXT="supertypes provide abstract interfaces">
<node CREATED="1417933920172" ID="ID_578876161" MODIFIED="1417933931074" TEXT="abstract=unimplemented"/>
</node>
<node CREATED="1417933937090" FOLDED="true" ID="ID_1247845938" MODIFIED="1419081698725" TEXT="subtypes provider concrete implementations">
<node CREATED="1417933977967" ID="ID_575336413" MODIFIED="1417934074281" TEXT="concrete=implemented"/>
</node>
</node>
</node>
<node CREATED="1417936861981" ID="ID_438226778" MODIFIED="1417936879472" TEXT="inheritance override/refine"/>
<node CREATED="1417936900897" ID="ID_1831977090" MODIFIED="1417936908818" TEXT="multiple inheritance"/>
<node CREATED="1417932770226" FOLDED="true" ID="ID_1379195395" MODIFIED="1419081734502" TEXT="root object">
<node CREATED="1417936680391" ID="ID_646495750" MODIFIED="1419081709219" TEXT="why root object">
<node CREATED="1417934570869" ID="ID_141016007" MODIFIED="1417936689095" TEXT="statically typed+strongly typed+ no root object (C++)">
<node CREATED="1417934807437" ID="ID_213223226" MODIFIED="1417935089606" TEXT="memory layout of object can be perceived by programmers"/>
<node CREATED="1417935093568" ID="ID_1505151027" MODIFIED="1417935136897" TEXT="STL"/>
</node>
<node CREATED="1417934606137" ID="ID_1203485554" MODIFIED="1417936689092" TEXT="statically typed+strongly typed+root object(Java)"/>
<node CREATED="1417934618512" ID="ID_1137793308" MODIFIED="1417936689090" TEXT="dynamically typed+strongly typed+root object(Smalltalk)"/>
<node CREATED="1417934704431" ID="ID_124875366" MODIFIED="1417936689088" TEXT="dynamically typed+weakly typed+root object(Perl)"/>
</node>
<node CREATED="1417936696199" ID="ID_660968690" MODIFIED="1417936735128" TEXT="Object "in Smalltalk""/>
</node>
<node CREATED="1417946169192" ID="ID_376579578" MODIFIED="1419081735610" TEXT="extending and modifying classes">
<icon BUILTIN="button_ok"/>
<node CREATED="1417946189479" ID="ID_851607608" MODIFIED="1417946280860" TEXT="ClsName extend [...] "modify variabes/methods of instance""/>
<node CREATED="1417946225425" ID="ID_467055626" MODIFIED="1417946294884" TEXT="ClsName class extend [...] "modify variabes/methods of class""/>
</node>
<node CREATED="1417946622425" ID="ID_1644417207" MODIFIED="1417946630263" TEXT="self super"/>
<node CREATED="1417947904298" FOLDED="true" ID="ID_755607215" MODIFIED="1419081779760" TEXT="demo">
<node CREATED="1417947906685" ID="ID_1031274496" MODIFIED="1417947918189">
<richcontent TYPE="NODE"><html>
<head>
</head>
<body>
<p>
"header: SuperClass subclass: Subclass"
</p>
<p>
Object subclass: Pet
</p>
<p>
"body: includes class/instance variables/methods comment"
</p>
<p>
[
</p>
<p>
    |name keeper| "instance variables"
</p>
<p>
    petnum:=0. "class variables"
</p>
<p>
    Pet >>new [^ self subclassResponsibility]
</p>
<p>
    setName:newName [name:=newName] "instance method"
</p>
<p>
    getName [^name]  "instance method,too"
</p>
<p>
    setKeeper:owner [keeper:=owner]
</p>
<p>
    getKeeper[^keeper]
</p>
<p>
]
</p>
<p>
Pet subclass: Kitty [
</p>
<p>
    <comment: 'class for little cats'> "comment"
</p>
<p>
    kittynum:=0.
</p>
<p>
    say[^'the little kitty ',name,' keeped by ',keeper,' say: "','Meow~~~"']
</p>
<p>
    "modify default new"
</p>
<p>
    Kitty class >>new[
</p>
<p>
        |this|
</p>
<p>
        this:=super new.
</p>
<p>
        kittynum:=kittynum+1.
</p>
<p>
        ^this.
</p>
<p>
    ]
</p>
<p>
    Kitty class >>newNamed:newName keepedBy:owner [
</p>
<p>
        <category: 'this is a class method'>
</p>
<p>
        |this|
</p>
<p>
        this:=Kitty new.
</p>
<p>
        this setName:newName;
</p>
<p>
             setKeeper:owner.
</p>
<p>
        ^this
</p>
<p>
    ]
</p>
<p>
    Kitty class >>getKittyNum [^kittynum]
</p>
<p>
]
</p>
<p>
Pet subclass: Puppy []
</p>
<p>
"instance extend"
</p>
<p>
Puppy extend [
</p>
<p>
    <comment: 'class for little dogs'>
</p>
<p>
    say[^'the little puppy ',name,' keeped by ',keeper,' say: "','Woof~~~"']
</p>
<p>
]
</p>
<p>
</p>
<p>
"class extend,just like companion Object in Scala"
</p>
<p>
Puppy class extend [
</p>
<p>
    puppynum:=0.
</p>
<p>
    new [
</p>
<p>
        |this|
</p>
<p>
        this:=super new.
</p>
<p>
        puppynum:= puppynum + 1.
</p>
<p>
        ^this
</p>
<p>
    ]
</p>
<p>
    newNamed:newName keepedBy:owner [
</p>
<p>
        |this|
</p>
<p>
        this:=Puppy new.
</p>
<p>
        this setName:newName;
</p>
<p>
             setKeeper:owner.
</p>
<p>
        ^this
</p>
<p>
    ]
</p>
<p>
    getPuppyNum [^puppynum]
</p>
<p>
]
</p>
<p>
</p>
<p>
|cat dog|
</p>
<p>
cat := Kitty new.
</p>
<p>
cat setName:'Mary';
</p>
<p>
    setKeeper:'Tom'.
</p>
<p>
dog := Puppy new.
</p>
<p>
dog setName:'John';
</p>
<p>
    setKeeper:'Dennis'.
</p>
<p>
cat1 := Kitty newNamed:'Lily' keepedBy:'Knuth'.
</p>
<p>
dog1 := Puppy newNamed:'Jim' keepedBy:'Lamport'.
</p>
<p>
Transcript show:cat say;cr.
</p>
<p>
Transcript show:dog say;cr.
</p>
<p>
Transcript show:cat1 say;cr.
</p>
<p>
Transcript show:dog1 say;cr.
</p>
<p>
Transcript show:(Kitty getKittyNum) printString;cr.
</p>
<p>
Transcript show:(Puppy getPuppyNum) printString;cr.
</p>
<p>
Transcript show:(cat class getKittyNum) printString;cr. "ditto"
</p>
</body>
</html></richcontent>
</node>
</node>
</node>
</node>
<node CREATED="1418195945675" ID="ID_1178760883" MODIFIED="1419563085034" POSITION="right" TEXT="Simula basic">
<node CREATED="1418196398777" ID="ID_1248236737" MODIFIED="1419082077848" TEXT="history">
<node CREATED="1418196402860" ID="ID_932552692" MODIFIED="1418196477419" TEXT="Simula I = SIMU-lation LA-nguage (1964-1965) based on Algol 60"/>
<node CREATED="1418196482756" ID="ID_1159214889" MODIFIED="1418196520329" TEXT="Simula 67 = SIM-ple U-niversal LAnguage (1967-1971)"/>
<node CREATED="1418196522059" ID="ID_221432471" MODIFIED="1418196529715" TEXT="Simula = Simula 67"/>
</node>
<node CREATED="1418196043949" ID="ID_814213265" MODIFIED="1418196052374" TEXT="case-insensitive"/>
<node CREATED="1418197153122" FOLDED="true" ID="ID_1514178441" MODIFIED="1419082126919" TEXT="declaration & definition (just like old C style)">
<node CREATED="1418197179695" ID="ID_1990745177" MODIFIED="1418199861861" TEXT="local variables">
<node CREATED="1418197219436" ID="ID_1613255377" MODIFIED="1419082092511" TEXT="forbid explicitly initializing variables when declaring them">
<node CREATED="1418197537376" ID="ID_243920457" MODIFIED="1418197546547">
<richcontent TYPE="NODE"><html>
<head>
</head>
<body>
<p>
begin
</p>
<p>
    integer a,b;
</p>
<p>
    ! integer a;
</p>
<p>
    ! integer b;
</p>
<p>
    ! integer a=0;!initialization is illegal;
</p>
<p>
    a:=0;
</p>
<p>
    b:=a;
</p>
<p>
    OutInt(b,10);
</p>
<p>
    OutImage;
</p>
<p>
end
</p>
</body>
</html></richcontent>
</node>
</node>
<node CREATED="1418199874242" FOLDED="true" ID="ID_1433925870" MODIFIED="1419082099066" TEXT="implicitly/default initialization">
<node CREATED="1418199897701" ID="ID_214068085" MODIFIED="1418199916239">
<richcontent TYPE="NODE"><html>
<head>
</head>
<body>
<pre style="word-spacing: 0px; font-style: normal; font-weight: normal; text-align: start; text-transform: none; font-variant: normal; letter-spacing: normal; color: rgb(0, 0, 0); line-height: normal; text-indent: 0px"> integer 0
short integer 0
real 0.0
long real 0.0
character The ISO NULL character, which is 'invisible'.
Boolean False
text NoText, the empty text, referring to an empty string.
Equivalent to "".</pre>
</body>
</html></richcontent>
</node>
</node>
<node CREATED="1418200127546" ID="ID_448374699" MODIFIED="1418200193252" TEXT="declaration with initialization is constant">
<node CREATED="1418200194276" ID="ID_456782647" MODIFIED="1418200226013">
<richcontent TYPE="NODE"><html>
<head>
</head>
<body>
<p>
begin
</p>
<p>
    real PI=3.1415926;
</p>
<p>
    text a="foobar";
</p>
<p>
    integer n=10;
</p>
<p>
    character c='c';
</p>
<p>
    boolean b=false;
</p>
<p>
end
</p>
</body>
</html></richcontent>
</node>
</node>
<node CREATED="1418197307890" ID="ID_1606545524" MODIFIED="1418197326725" TEXT="declare variables before use them"/>
</node>
<node CREATED="1418197207131" ID="ID_1766725958" MODIFIED="1418197216936" TEXT="procedure parameters"/>
</node>
<node CREATED="1418195969627" FOLDED="true" ID="ID_997682203" MODIFIED="1419082147354" TEXT="statically typed">
<node CREATED="1418196158174" ID="ID_1732233149" MODIFIED="1419082130015" TEXT="types">
<node CREATED="1418198496112" ID="ID_658840825" MODIFIED="1418198499654" TEXT="value types">
<node CREATED="1418198439119" ID="ID_152241950" MODIFIED="1418199790072" TEXT="boolean"/>
<node CREATED="1418198622965" ID="ID_1430130548" MODIFIED="1418198626921" TEXT="character">
<node CREATED="1418199775369" MODIFIED="1418199775369">
<richcontent TYPE="NODE"><html>
<head>
</head>
<body>
<pre style="word-spacing: 0px; font-style: normal; font-weight: normal; text-align: start; text-transform: none; font-variant: normal; letter-spacing: normal; color: rgb(0, 0, 0); line-height: normal; text-indent: 0px"> 'A'
'b'
'4'
'%'
' '
'''
'!3!' Control character, enclosed in exclamation marks.</pre>
</body>
</html></richcontent>
</node>
</node>
<node CREATED="1418196025073" ID="ID_589411500" MODIFIED="1418198425828" TEXT="integer"/>
<node CREATED="1418196038215" ID="ID_1371170810" MODIFIED="1418198425826" TEXT="real">
<node CREATED="1418199390593" ID="ID_1209704283" MODIFIED="1418199390593">
<richcontent TYPE="NODE"><html>
<head>
</head>
<body>
<pre style="word-spacing: 0px; font-style: normal; font-weight: normal; text-align: start; text-transform: none; font-variant: normal; letter-spacing: normal; color: rgb(0, 0, 0); line-height: normal; text-indent: 0px"> 2.67
0.54
.54
- 12.68&-6
&&12</pre>
</body>
</html></richcontent>
</node>
<node CREATED="1418199407955" ID="ID_976922634" MODIFIED="1418199681156" TEXT="&&12 ! 1.e12;">
<node CREATED="1418199695958" ID="ID_1382601330" MODIFIED="1418199698451" TEXT="long real"/>
</node>
<node CREATED="1418199669556" ID="ID_892445244" MODIFIED="1418199683869" TEXT="&12 ! 1.e12f;">
<node CREATED="1418199684770" ID="ID_1905520234" MODIFIED="1418199693380" TEXT="short real"/>
</node>
</node>
</node>
<node CREATED="1418198506697" ID="ID_1380029352" MODIFIED="1419082136928" TEXT="reference types">
<node CREATED="1418196056206" ID="ID_1699873306" MODIFIED="1418198536267" TEXT="text"/>
<node CREATED="1418198434909" ID="ID_1484094334" MODIFIED="1418198505567" TEXT="array"/>
<node CREATED="1418198537167" ID="ID_490566634" MODIFIED="1418198544601" TEXT="object"/>
</node>
</node>
<node CREATED="1418196162851" ID="ID_468473637" MODIFIED="1418196169448" TEXT="type cast">
<node CREATED="1418196170826" ID="ID_1555630722" MODIFIED="1418196184182" TEXT="implicit conversion">
<node CREATED="1418196191864" ID="ID_1924768624" MODIFIED="1418196210485" TEXT="{short, long} {integer,real}"/>
</node>
<node CREATED="1418196184584" ID="ID_881239170" MODIFIED="1418196189085" TEXT="explicit conversion"/>
</node>
</node>
<node CREATED="1418196216039" ID="ID_513674724" MODIFIED="1419082148284" TEXT="assign&equal">
<node CREATED="1418196275251" ID="ID_1996306551" MODIFIED="1418198350261" TEXT=":= !deep/value assignment;"/>
<node CREATED="1418196278928" FOLDED="true" ID="ID_100200436" MODIFIED="1418198404751" TEXT=":- !shallow/reference assignment;">
<node CREATED="1418198390020" ID="ID_118918405" MODIFIED="1418198401359">
<richcontent TYPE="NODE"><html>
<head>
</head>
<body>
<p>
begin
</p>
<p>
    Text a,b,c;
</p>
<p>
    a:-"foobar";! a ref to a immutalbe string;
</p>
<p>
    b:-blanks(10);! a ref to a mutable string;
</p>
<p>
    c:-"barfoo";
</p>
<p>
    !a:=b; !(deep assign) illegal assignment, you can't modify const string;
</p>
<p>
    !a:-b; !(shallow assign) legal,you can modify ref;
</p>
<p>
    b:=a; ! legal, you can modify non-const string;
</p>
<p>
    OutText(a);
</p>
<p>
    OutText(b);
</p>
<p>
    OutText(c);
</p>
<p>
    OutImage;
</p>
<p>
end;
</p>
</body>
</html></richcontent>
</node>
</node>
<node CREATED="1418196282942" ID="ID_253601307" MODIFIED="1418196287049" TEXT="=">
<node CREATED="1418201235245" ID="ID_136380444" MODIFIED="1418201270301">
<richcontent TYPE="NODE"><html>
<head>
</head>
<body>
<pre style="word-spacing: 0px; font-style: normal; font-weight: normal; text-align: start; text-transform: none; font-variant: normal; letter-spacing: normal; color: rgb(0, 0, 0); line-height: normal; text-indent: 0px"> = <i>eq</i> is equal to
<> <i>ne</i> is not equal to
> <i>gt</i> is greater than
< <i>lt</i> is less than
>= <i>ge</i> is greater than or equal to
<= <i>le</i> is less than or equal to</pre>
</body>
</html></richcontent>
</node>
</node>
<node CREATED="1418196284329" ID="ID_1801611803" MODIFIED="1418200489465" TEXT="ne"/>
</node>
<node CREATED="1418200491436" ID="ID_591528943" MODIFIED="1419082151072" TEXT="statements">
<node CREATED="1418200501952" ID="ID_1720467954" MODIFIED="1418200513909" TEXT="simple statement"/>
<node CREATED="1418200532207" ID="ID_296240103" MODIFIED="1418200574212" TEXT="begin blockstmts end"/>
<node CREATED="1418200575817" ID="ID_969070605" MODIFIED="1418200594204" TEXT="if then else"/>
<node CREATED="1418200597528" ID="ID_1920529695" MODIFIED="1418200599487" TEXT="if then "/>
<node CREATED="1418201547005" ID="ID_550537545" MODIFIED="1418201549284" TEXT="while do"/>
<node CREATED="1418203116385" ID="ID_1231342401" MODIFIED="1418203589639" TEXT="for step until do"/>
</node>
</node>
</node>
</map>