Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter 16 #1

Open
Ducasse opened this issue Jan 30, 2024 · 0 comments
Open

Chapter 16 #1

Ducasse opened this issue Jan 30, 2024 · 0 comments

Comments

@Ducasse
Copy link
Member

Ducasse commented Jan 30, 2024

  • Chap16
    16.9 Class creation messages Page182
    Better instance creation for additions:

EEAdditionTest >> testEvaluateWithClassCreationMessage
| ep1 ep2 |
ep1 := EConstant constant5.
ep2 := EConstant constant3.
self assert: (EAddition left: ep1 right: ep2) evaluate equals: 8

Ici on n'a pas encore définir message constant5 et constant3.


  • 16.11 Printing Page186
    Printing constant

EConstantTest >> testPrinting
self assert: (EConstant value: 5) printString equals: '5'

Ici on peut remplace (EConstant value: 5) à EConstant constant5


16.16 Variables Page195
Back to variable expressions

EVariable >> printOn: aStream
aStream nexPutAll: id asString

Il manque un 't': nextPutAll: .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant