<html><head></head><body><div dir="auto"><personalRant><br><br></div>
<div dir="auto">Personally, I always hated the awkward <i>Microsoftean</i> way to LOCATE things to PRINT. Two statements? Why?<br><br></div>
<div dir="auto">Instead, always loved the british <i>Sinclairean</i> way, which uses:<br><br></div>
<div dir="auto"><b>PRINT AT <line>, <column></b><br><br></div>
<div dir="auto">Simple, elegant, shorter, it has it all... and even looks more VT100 oriented, where you put coordinate/color/etc. codes right before the payload. Same way to handle attributes (color, etc):<br><br></div>
<div dir="auto"><b>PRINT AT 3, 10; INK 7; PAPER 0; FLASH 1; INVERSE 0; BRIGHT 1; OVER 0;"Hello world."</b><br></div>
<div dir="auto"> <br></div>
<div dir="auto">Could go on with replacing the also Microsoftean LEFT$, RIGHT$ and MID$ abominations with the simpler and more readable Sinclairean syntax<br><br></div>
<div dir="auto"><b>VAR$(<startIndex> TO <endIndex>)</b><br><br></div>
<div dir="auto"> but enough nostalgia trip...<br><br></div>
<div dir="auto"></personalRant><br><br></div>
<div dir="auto">ZXMarce.<br></div>
<div class="gmail_quote" >On Apr 27, 2019, at 10:00, Cedron Dawg <<a href="mailto:cedron@exede.net" target="_blank">cedron@exede.net</a>> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="blue">Hi K,<br><br>I appreciate that.<br><br>Had you said:  "Please note I don't think there is a problem with my code, I am looking for guidance on how to go about debugging Gambas."<br><br>Instead of:<br><br>"Please note I am not looking for anyone to tell me the problem with my code, I am looking for guidance on how to go about debugging a Gambas application."<br><br>Then I wouldn't have had to fluster Jussi a little bit.  (BTW, Jussi, I wrote a comprehensive byte-code interpreter in 8086 assembly in Real Mode as a DOS 3.1 TSR that was used in production for several years, circa 1988)<br><br>I don't like ncurses, it is a bloated mess, but it's been around a long time, so if that is the locus of the problem, I would suspect gb.ncurses first.<br><br>I've attached an incomplete project which you might find useful.  It is part of a path towards a lightweight ncurses "equivalent".  The attached code is essentially the same as early BASICs:  It gives you a Locate statement for printing and provides an Inkey and Line Input for reading terminal input with VT100 escape sequences translated to character codes.<br><br>Ced<br><br><br>----- Original Message -----<br>From: "KKing" <kicking177@gmail.com><br>To: "user" <user@lists.gambas-basic.org><br>Sent: Saturday, April 27, 2019 4:41:36 AM<br>Subject: Re: [Gambas-user] Debugging Gambas (again)<br><br>thankyou, that gives me a better understanding and lets me plan next <br>steps, which will be to grab latest sources and compile with the <br>"-DDEBUG_ME" to CFLAGS and CXXFLAGS, which I will not have done last time.<br><br>@Ced: I am "interested in these advanced debugging techniques" and also <br>because I've been through the<br><<<br>Traditional source code level debugging, e.g. print statements, <br>breakpoints, and watch variables<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"><br></blockquote></blockquote>And found that it fails in a section of code that is called repeatedly <br>without issue until the segfault and by nature of the data that is being <br>passed around and changing the order it is entered I know it is not the <br>data and on face of it not program code. The goal is to not only get the <br>code to run but also to establish why it is failing and if it is within <br>Gambas internals or a component, to help identify and improve it, or in <br>worst case have a "do not do this with Gambas".<br><br>K.<br></pre><pre class="blue"><br>----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net">https://www.hostsharing.net</a> ]----<br></pre></blockquote></div></body></html>