Jump to content

Category:Smalltalk: Difference between revisions

Line 280:
As smalltalk code seems to be hard to read for programmers with a C background, some examples are provided below.
=== Comments ===
<lang smalltalk>"a comment - everything in between double quotes"</lang>
<lang smalltalk>"/ an end-of-line comment can have comments here (dialect specific &sup1;)</lang>
 
<lang smalltalk>"/<<TOK ana end-of-linetoken comment can have comments here (dialect specific &sup1;)
 
"<<TOK a token comment (dialect specific)
<br>... can have any comment
<br>... or EOL comment here
<br>... up to a line starting with TOK
<br>TOK</lang>
1) these are not supported by all dialects; however; since even the Parser is open for extension, it is trivial to add support to all systems, by changing the comment reader in the token scanner code.
 
=== Literals ===
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.