QB64 IDE bug and an SNL moment... - Printable Version +- QB64 Phoenix Edition (https://staging.qb64phoenix.com) +-- Forum: Chatting and Socializing (https://staging.qb64phoenix.com/forumdisplay.php?fid=11) +--- Forum: General Discussion (https://staging.qb64phoenix.com/forumdisplay.php?fid=2) +--- Thread: QB64 IDE bug and an SNL moment... (/showthread.php?tid=1109) Pages:
1
2
|
QB64 IDE bug and an SNL moment... - Pete - 11-12-2022 So I start typing away at this itty bitty program when all of a sudden, bam! The crazy IDE eats a piece of my code. Well Jane, I look at the screen and say, "Hey! Why'd you eat a piece of my code?" Now the I-D-E, it can't talk back to me, especially with it's mouth all full of my code, but it just goes to show you, Jane, it's always something... Try and type then press Enter... Code: (Select All) REDIM c$(1000): idx = UBOUND(c$) - _HEIGHT - 125 Sam Samannadanna RE: QB64 IDE bug and an SNL moment... - PhilOfPerth - 11-12-2022 (11-12-2022, 03:09 AM)Pete Wrote: So I start typing away at this itty bitty program when all of a sudden, bam! The crazy IDE eats a piece of my code. Well Jane, I look at the screen and say, "Hey! Why'd you eat a piece of my code?" Now the I-D-E, it can't talk, especially with it's mouth all full of my code.Weird! Can't wait for you to explain what happened to the end bit! RE: QB64 IDE bug and an SNL moment... - SMcNeill - 11-12-2022 It's been ages since I last found a code-eatting bug. Generally this thing is some error checking and formatting going on in the IDE that just loses track of a variable due to them being recycled repeatedly. Without looking at the code, my bet is going to be on e$ getting overwritten somewhere that it shouldn't be. Since this is such a short piece of code which produces the glitch (thanks for that! The last code-eatting bug I chased down would eat two pages of code at once and was a real PITA to narrow down the root source!), I imagine the problem in is _HEIGHT. If no one else gets around to it first, I'll dig into it and look for the issue once I finish playing around with the load/save dialogs and chasing after your silly SCREEN 0 + _FONT memory leak, which is currently breaking my brain. RE: QB64 IDE bug and an SNL moment... - Pete - 11-12-2022 Actually, I have another one. Failure to capitalize. Now not everyone has the cap keyword option activated, so if you don't don't bother trying this out. If you do, you'll notice when you hit Enter, the keywords will not be capitalized. Code: (Select All) if a then else Pete RE: QB64 IDE bug and an SNL moment... - SMcNeill - 11-12-2022 Quit finding glitches! Or else we're going to make you start debugging them! RE: QB64 IDE bug and an SNL moment... - Pete - 11-12-2022 Another weird one is in version 3.30, I can't get it to save more than 3 searches in the search history. I tried clearing it. Okay, cleared, but once again after the third search got added, it stopped saving additional searches. Pete RE: QB64 IDE bug and an SNL moment... - mnrvovrfc - 11-12-2022 (11-12-2022, 03:22 AM)Pete Wrote: Actually, I have another one. Failure to capitalize.It's because if "THEN" part is to remain empty, it needs to be in a block "IF", that's what the "formatter" is expecting. In fact it should return an error for not having "END IF" at the end of it all, but it defeats itself because the whole thing is a single-line "IF" statement that it knows it should support back to GW-BASIC. (11-12-2022, 03:09 AM)Pete Wrote: Try and type then press Enter...Likely this is the "formatter" thinking the first parameter for "UBOUND" should have parenthesis because it should be the name of an array but doesn't want any parenthesis, which makes it a PITA (wanted to say "special case" but writing a parser for any language is not easy and don't tell me using LISP to write it makes it easier!) So the "formatter" tries to put one for "_HEIGHT". Indeed this is the weirdest I've seen this slow editor doing. :/ BTW changed "UBOUND" to "LBOUND" and does the same thing. Changed "_HEIGHT" to "_WIDTH", no change. Added "(0)" to the end of "_HEIGHT" it didn't dare change it. RE: QB64 IDE bug and an SNL moment... - PhilOfPerth - 11-12-2022 (11-12-2022, 03:32 AM)Pete Wrote: Another weird one is in version 3.30, I can't get it to save more than 3 searches in the search history. I tried clearing it. Okay, cleared, but once again after the third search got added, it stopped saving additional searches.Uh,oh, now you're in trouble! RE: QB64 IDE bug and an SNL moment... - mnrvovrfc - 11-12-2022 @Pete I hope that you don't have to call "REDIM _PRESERVE" 50 times or so inside a loop before you transfer the code you showed off in the other thread LOL. RE: QB64 IDE bug and an SNL moment... - Pete - 11-12-2022 Au contraire! Press any key then type in something you want added to the list. Code: (Select All) FOR i = 1 TO 50 So you can add without worry of counting. Also, for testing, you don't need to change a DIM statement plus the array statement. Another plus is this method allows you to use ubounds() instead of a terminal counter. Pete |