<body><div id="__MailbirdStyleContent" style="font-size: 12pt;font-family: calibri;color: #000000">
                                        Ooops, I messed with the layout. Here again:<div><br></div><div><div>1 to: 9 do: [:i |</div><div><span class="Apple-tab-span" style="white-space:pre">      </span>1 to: i do: [:j | Transcript show: ('{1} * {2} = {3} ' format: {i.j.i*j}) ].</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Transcript cr].</div></div><div><br></div><div>So, you can use #format: to format strings more concisely.</div><div><br></div><div>Best,</div><div>Marcel</div><div class="mb_sig"></div><blockquote class="history_container" type="cite" style="border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;">
                        <p style="color: #AAAAAA; margin-top: 10px;">Am 06.11.2017 09:20:45 schrieb Marcel Taeumel <marcel.taeumel@hpi.de>:</p><div id="__MailbirdStyleContent" style="font-size: 12pt;font-family: calibri;color: #000000">
                                        Hmm...<div><br></div><div><div>1 to: 9 do: [:i | 1 to: i do: [:j |</div><div>  Transcript showln: ('{1} * {2} = {3}' format: {i.j.i*j}) ]].</div></div><div><br></div><div>Best,</div><div>Marcel</div><div class="mb_sig"></div><blockquote class="history_container" type="cite" style="border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;">
                        <p style="color: #AAAAAA; margin-top: 10px;">Am 06.11.2017 08:28:00 schrieb RedTigerFish <chihuyu@gmail.com>:</p>I am using Smalltalk to type in Transcript window a 1-9 multiplication table<br>.<br><br>Here is my code:<br><br>*1 to: 9 do: [:i|<br>    1 to: i do: [:j|<br>        Transcript show: j.<br>        Transcript show: ' * '.<br>        Transcript show: i.<br>        Transcript show: ' = '.<br>        Transcript show: j * i.<br>        Transcript show: '  '.<br>        ].<br>    Transcript show: ' '; cr.<br>    ].*<br>As can be seen, the above code, although working fine, looks far from<br>beautiful and concise.<br><br>I had hoped to write something like :<br><br>*Transcript show: j '*' i '=' j * i.*<br>Unfortunately, they are wrong. I remember C has a very nice way to handle<br>that issue of mine.<br><br>Like, *printf("%d * %d = %d ", j, i, j * i);*<br><br>Is there a more elegant way to make Smalltalk codes elegant in this<br>situation ?<br><br><br><br>-----<br>Dig, dig where you are,<br>Down below's well.<br>Let those that walk in darkness shout, <br>Down below's hell.<br>--<br>Sent from: http://forum.world.st/Squeak-Beginners-f107673.html<br>_______________________________________________<br>Beginners mailing list<br>Beginners@lists.squeakfoundation.org<br>http://lists.squeakfoundation.org/mailman/listinfo/beginners<br>
                        </blockquote>
                                        </div>
                        </blockquote>
                                        </div></body>