<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: arial,helvetica,sans-serif; font-size: 12pt; color: #000000'><div>Hi Joel,</div><div><br></div>Good catch !<div><br></div><div>Thanks<br><br><div><span name="x"></span>Dr. Geo -- http://gnu.org/s/dr-geo<span name="x"></span><br></div><br><hr id="zwchr"><blockquote style="border-left:2px solid rgb(16, 16, 255);margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div dir="ltr"><div>Hi folks!</div><div>Here I bring a bugfix of ExtractToTemporary with its test.</div><div>The problem was that if a variable declaration does not have a space at the end, and someone wants to extract a new temporary, it will add the new temporary variable in the middle of the last one.</div><div>Example: Suppose we want to create a temporary variable with the highlighted code, and the new variable name will be <i>newVar</i>. </div><div>m1</div><div> |var|</div><div> var := 1.</div><div> ^ <span style="background-color:">var + 2</span></div><div><br></div><div>After extracting the variable it will end like this</div><div>m1</div><div> |va newVarr|</div><div> <font color="#ff0000">var</font> := 1.<br> <u>newVar</u> := <font color="#ff0000">var</font> + 2.<br> ^ <u>newVar</u></div><div><br></div><div>Checking the code, ExtractToTemporary assumes the last space of variable declaration exists. So the fix is checking if the space exists or not and return the right index to add the new variable.</div><div><br></div><div>Have a nice day!</div><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><br></div><a href="https://10pines.com/" style="font-family:Roboto,Helvetica,Arial,sans-serif;font-size:medium" target="_blank"><img width="108" style="margin-bottom:0.5em" src="https://10pines.github.io/email-signature/10pines-firma@2x.png"></a><h1 style="margin:0px;font-size:14px"><font color="#999999">Joel Cámera</font></h1><h2 style="color:;margin:0px 0px 1em;font-size:14px">Agile Software Development</h2><h1 style="margin:0px;font-size:14px"><font style="font-weight:normal" color="#666666"><p style="margin:0px;font-size:12px">Alem 896, Floor 6, Buenos Aires, Argentina</p><p style="margin:0px;font-size:12px">+54 9 011 6091 3125</p></font></h1></div></div></div></div>
<br>-- <br>Cuis-dev mailing list<br>Cuis-dev@lists.cuis.st<br>https://lists.cuis.st/mailman/listinfo/cuis-dev<br></blockquote><br></div></div></body></html>