[Pharo-project] Pharo by example book: copying/pasting code snippets
When I copy and paste code snippets from the book, the compiler complains about the minus signs (which is different character from what Pharo expects): For example the line from the book: (j > 1) ifTrue: [ (cells at: i at: j - 1) toggleState]. I have to change to (with "short" minus sign) (j > 1) ifTrue: [ (cells at: i at: j - 1) toggleState]. Otherwise the method doesn't get accepted. I wonder if this is a PDF issue and if it could be corrected? Thank you, Andrew
Hi andrei this is a pdf issue. I suggest you to type the code this is the best way to learn. Stef On May 13, 2010, at 11:13 PM, Andrei Stebakov wrote:
When I copy and paste code snippets from the book, the compiler complains about the minus signs (which is different character from what Pharo expects):
For example the line from the book: (j > 1) ifTrue: [ (cells at: i at: j â 1) toggleState]. I have to change to (with "short" minus sign) (j > 1) ifTrue: [ (cells at: i at: j - 1) toggleState]. Otherwise the method doesn't get accepted. I wonder if this is a PDF issue and if it could be corrected?
Thank you, Andrew
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
On 13 May 2010, at 23:19, Stéphane Ducasse wrote:
On May 13, 2010, at 11:13 PM, Andrei Stebakov wrote:
When I copy and paste code snippets from the book, the compiler complains about the minus signs (which is different character from what Pharo expects):
For example the line from the book: (j > 1) ifTrue: [ (cells at: i at: j â 1) toggleState]. I have to change to (with "short" minus sign) (j > 1) ifTrue: [ (cells at: i at: j - 1) toggleState]. Otherwise the method doesn't get accepted. I wonder if this is a PDF issue and if it could be corrected?
this is a pdf issue. In my latex documents, using a lstlisting environment, this isn't a problem... Tested on OS X.
Best regards Stefan
On Thu, May 13, 2010 at 11:35 PM, Stefan Marr <pharo@stefan-marr.de> wrote:
On 13 May 2010, at 23:19, Stéphane Ducasse wrote:
On May 13, 2010, at 11:13 PM, Andrei Stebakov wrote:
When I copy and paste code snippets from the book, the compiler
complains about the minus signs (which is different character from what Pharo expects):
For example the line from the book: (j > 1) ifTrue: [ (cells at: i at: j - 1) toggleState]. I have to change to (with "short" minus sign) (j > 1) ifTrue: [ (cells at: i at: j - 1) toggleState]. Otherwise the method doesn't get accepted. I wonder if this is a PDF issue and if it could be corrected?
this is a pdf issue. In my latex documents, using a lstlisting environment, this isn't a problem... Tested on OS X.
Best regards Stefan
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
On 13/05/2010 22:13, Andrei Stebakov wrote:
When I copy and paste code snippets from the book, the compiler complains about the minus signs (which is different character from what Pharo expects):
For example the line from the book: (j > 1) ifTrue: [ (cells at: i at: j â 1) toggleState]. I have to change to (with "short" minus sign) (j > 1) ifTrue: [ (cells at: i at: j - 1) toggleState]. Otherwise the method doesn't get accepted. I wonder if this is a PDF issue and if it could be corrected?
Looks like the pdf is using the unicode minus character instead of the ascii dash (which Pharo uses for minus) which are not the same. I wouldn't like to argue about which is in the wrong here ;)
participants (5)
-
Andrei Stebakov -
Douglas Brebner -
Mariano Martinez Peck -
Stefan Marr -
Stéphane Ducasse