How to comment in Squeak Smalltalk?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to comment in Squeak Smalltalk?

RedTigerFish
In Squeak programming ,   "comment " is very needed in order to make the
source code easier for humans to understand and maintain.

However, I find "//"  and /*     */  to be not working.

What can I do in order to comment in Squeak programming ?



-----
Dig, dig where you are,
Down below's well.
Let those that walk in darkness shout,
Down below's hell.
--
Sent from: http://forum.world.st/Squeak-Beginners-f107673.html
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Dig, dig where you are,
Down below's well.
Let those that walk in darkness shout,
Down below's hell.
Reply | Threaded
Open this post in threaded view
|

Re: How to comment in Squeak Smalltalk?

Hannes Hirzel
Comment is enclosed in double quotes, e.g.

    " .... this is my comment "

Most methods have a comment.

In addition many classes have a 'examples' category on the class side
where you put some example code which show how the class is to be
used.


On 11/10/17, RedTigerFish <[hidden email]> wrote:

> In Squeak programming ,   "comment " is very needed in order to make the
> source code easier for humans to understand and maintain.
>
> However, I find "//"  and /*     */  to be not working.
>
> What can I do in order to comment in Squeak programming ?
>
>
>
> -----
> Dig, dig where you are,
> Down below's well.
> Let those that walk in darkness shout,
> Down below's hell.
> --
> Sent from: http://forum.world.st/Squeak-Beginners-f107673.html
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: How to comment in Squeak Smalltalk?

K K Subbu
In reply to this post by RedTigerFish
On Friday 10 November 2017 10:57 AM, RedTigerFish wrote:
> In Squeak programming ,   "comment " is very needed in order to make the
> source code easier for humans to understand and maintain.
>
> However, I find "//"  and /*     */  to be not working.

This is C/C++ syntax. Won't work in Smalltalk. Smalltalk is much more
compact than C/C++. You may find the following helpful in getting to
know Smalltalk:

   http://www.jera.com/techinfo/readingSmalltalk.pdf

> What can I do in order to comment in Squeak programming ?

Use double quotes.

HTH .. Subbu
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners