<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt;"><div><br></div><div>Hi Christoph<br></div><div><br></div><div>Thank you.<br></div><div><br></div><div>I too saw the uselessness of the attempted assignment and have removed them.<br></div><div><br></div><div>I agree also on the "style" issue as it makes my feeble brain ache less.<br></div><div><br></div><div>cordially,<br></div><div><br></div><div><br></div><div class="zmail_extra_hr" style="border-top: 1px solid rgb(204, 204, 204); height: 0px; margin-top: 10px; margin-bottom: 10px; line-height: 0px;"><br></div><div class="zmail_extra" data-zbluepencil-ignore="true"><div><br></div><div id="Zm-_Id_-Sgn1">---- On Wed, 10 Nov 2021 08:37:05 -0500 <b>Thiede, Christoph <Christoph.Thiede@student.hpi.uni-potsdam.de></b> wrote ----<br></div><div><br></div><blockquote style="margin: 0px;"><div class="zm_582786609422627143_parse_-3512397565087842761"><div id="x_-705751963divtagdefaultwrapper" style="font-size :  12pt; color :  #000000; font-family :  Calibri, Helvetica, sans-serif;" dir="ltr"><p style="margin-top: 0; margin-bottom: 0;">There is a preference for this: <span>Scanner allowBlockArgumentAssignment which false by default. However, I would rarely consider this good style; usually, it's a better idea to declare a separate temp var to keep arguments immutable. But if I did not
 misread your example, you do not need the assignments anyway - the into: block of #inject:into: just needs to answer the next accumulated value, and you already do this even if you do not reassign the block argument variable.</span><br></p><p style="margin-top: 0; margin-bottom: 0;"><span><br></span></p><p style="margin-top: 0; margin-bottom: 0;"><span>Best,</span><br></p><p style="margin-top: 0; margin-bottom: 0;"><span>Christoph</span><br></p></div><div><hr style="display :  inline-block; width :  98%;"><br></div><div id="x_-705751963divRplyFwdMsg" dir="ltr"><div><span class="font" style="font-family:Calibri, sans-serif"><span class="colour" style="color:#000000"><b>Von:</b> Squeak-dev <<a href="mailto:squeak-dev-bounces@lists.squeakfoundation.org" target="_blank">squeak-dev-bounces@lists.squeakfoundation.org</a>> im Auftrag von gettimothy via Squeak-dev <<a href="mailto:squeak-dev@lists.squeakfoundation.org" target="_blank">squeak-dev@lists.squeakfoundation.org</a>><br> <b>Gesendet:</b> Dienstag, 9. November 2021 15:44:11<br> <b>An:</b> squeak-dev<br> <b>Betreff:</b> [squeak-dev] Cannot store into-> (Is this related to changes in Spur)?</span></span> </div><div> <br></div></div><div><div style="font-family :  Verdana,  Arial,  Helvetica,  sans-serif; font-size :  10pt;"><div>Hi Folks,<br></div><div><br></div><div>I am migrating a package from Cog to Spur and I am getting errors that I suspect are related to it.<br></div><div><br></div><div><br></div><div>Here is an example:<br></div><div><br></div><div><br></div><div><blockquote style="border :  1px solid rgb(204, 204, 204); padding :  7px; background-color :  rgb(245, 245, 245);"><div>|result|<br></div><div>  result := pairs inject: first<br></div><div>                        into: [ :base  :pair |<br></div><div>                              (pair first = 'round')<br></div><div>                                    ifTrue: [<br></div><div>                                                (pair last >= 0)<br></div><div>                                                      ifTrue:[<br></div><div>                                                            (base >=0)<br></div><div>                                                                  ifTrue:[<b>"Cannot store into ->"</b>base := base roundUpTo: ((1/10) raisedTo:(pair last truncated)) asFloat]<br></div><div>                                                                  ifFalse:[base := base roundDownTo: ((1/10) raisedTo:(pair last truncated)) asFloat]]<br></div><div>                                                      ifFalse:[<br></div><div>                                                            (base >=0)  <br></div><div>                                                                  ifTrue:[<br></div><div>                                                                              base := base roundDownTo: ((1/10) raisedTo:(pair last truncated)) asFloat]<br></div><div>                                                                                         ifFalse:[base := base roundUpTo: ((1/10) raisedTo:(pair last truncated)) asFloat]]]].<br></div><div><br></div><div>                                                                        transcripton ifTrue:[Transcript show:'PHPRoundSimple ' , (result asFloat); cr. ].<br></div><div><br></div><div>^ result<br></div></blockquote><div><br></div></div><div>Is this related to changes in Spur?<br></div><div><br></div><div>thx<br></div><div><br></div><div>t<br></div></div><div><br></div></div></div></blockquote></div><div><br></div></div><br></body></html>