septomin [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=10548 Print without newline resets x position to 0 <p>The manual states that if you don't want to print a newline, you can include a \0 at the end of the string. However, if you do this, the cursor x position gets reset to 0 and the next thing printed will overlap:</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/10548/Screenshot 2024-12-03 at 7.44.48 PM.png" alt="" /> <p>For comparison PICO-8 keeps the x-position allowing you to print without overlap:</p> <img loading="lazy" style="margin-bottom:16px" border=0 src="/media/10548/Screenshot 2024-12-03 at 7.44.40 PM.png" alt="" /> https://www.lexaloffle.com/bbs/?tid=146190 https://www.lexaloffle.com/bbs/?tid=146190 Wed, 18 Dec 2024 15:27:13 UTC Low precision of integers returned from split() <p>When using split to convert strings to numbers (the default) it seems to have precision issues converting integers well below the 64 bit limit:</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>p=split(&quot;123456789&quot;, &quot; &quot;) ?p[1] ?math.type(p[1])</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>shows 123456792 and indicates the type is integer</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>p=split(&quot;123456789&quot;, &quot; &quot;, false) n=tonum(p[1]) ?n ?math.type(n)</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>shows 123456789 and also indicates the type is integer.</p> https://www.lexaloffle.com/bbs/?tid=145972 https://www.lexaloffle.com/bbs/?tid=145972 Sat, 07 Dec 2024 23:27:28 UTC dir({}) causes crash <p>Passing an object to dir seems to cause PICO-8 to exit immediately. Nothing relevant in log.txt.</p> <p>To reproduce:</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>dir({})</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> https://www.lexaloffle.com/bbs/?tid=38907 https://www.lexaloffle.com/bbs/?tid=38907 Sun, 19 Jul 2020 19:12:24 UTC