#167 Error in Instantiation lesson on ProfStef

Closed
opened 8 years ago by nero · 0 comments

Originally at 2012-04-20T16:30:31Z by Erik Ferguson closed at 2012-05-08T16:05:07Z

Hi, I'm sorry if this isn't the right place to report this as I am new to programming and GitHub. I was going through the lessons on ProfStef and found a problem in the Instantiation lesson (number 21).

The code on the page says:

|anArray|

anArray := Array new
    add: 'Some text';
    add: 3;
    yourself;

Transcript show: anArray; cr.

anArray remove: 3.

Transcript show: anArray; cr.

anArray add: 'Some more text!'.

Transcript show: anArray; cr.

But when I try to Do It, I get the following error:

Parse error on line 8 column 1 : Expected [     \xA0\uFEFF\n\r\u2028\u2029], ["], [\\+*\/=><,@%~|&\-] or [a-z] but "T" found. Below is code with line numbers and ===> marker inserted:
1: doIt ^[|anArray|
2: 
3: anArray := Array new
4:  add: 'Some text';
5:  add: 3;
6:  yourself;
7: 
8:  ===>Transcript show: anArray; cr.
9: 
10: anArray remove: 3.
11: 
12: Transcript show: anArray; cr.
13: 
14: anArray add: 'Some more text!'.
15: 
16: Transcript show: anArray; cr.] value

To fix it, I changed the semicolon on line 6 to a period.

Originally at 2012-04-20T16:30:31Z by Erik Ferguson closed at 2012-05-08T16:05:07Z Hi, I'm sorry if this isn't the right place to report this as I am new to programming and GitHub. I was going through the lessons on ProfStef and found a problem in the Instantiation lesson (number 21). The code on the page says: ```smalltalk |anArray| anArray := Array new add: 'Some text'; add: 3; yourself; Transcript show: anArray; cr. anArray remove: 3. Transcript show: anArray; cr. anArray add: 'Some more text!'. Transcript show: anArray; cr. ``` But when I try to Do It, I get the following error: ``` Parse error on line 8 column 1 : Expected [ \xA0\uFEFF\n\r\u2028\u2029], ["], [\\+*\/=><,@%~|&\-] or [a-z] but "T" found. Below is code with line numbers and ===> marker inserted: 1: doIt ^[|anArray| 2: 3: anArray := Array new 4: add: 'Some text'; 5: add: 3; 6: yourself; 7: 8: ===>Transcript show: anArray; cr. 9: 10: anArray remove: 3. 11: 12: Transcript show: anArray; cr. 13: 14: anArray add: 'Some more text!'. 15: 16: Transcript show: anArray; cr.] value ``` To fix it, I changed the semicolon on line 6 to a period.
Sign in to join this conversation.
No Label
No Milestone
No assignee
1 Participants
Loading...
Cancel
Save
There is no content yet.