fujidude Posted July 18, 2019 Share Posted July 18, 2019 So... being a fan of human readable over tokenized source code files, I got the idea in my head that I should convert my tokenized Atari BASIC and BASIC-XL files into text based ones. I did so on about a dozen files by loading in the tokenized version, and then LISTing them out to a text version. I popped them open in The Last Word and they looked real good. So I went ahead and deleted the binary tokenized versions. Oopsy; rather than just verify the listed files came out good, I should have also verified that the would ENTER back in okay. Yes indeed. I am having trouble being able to successfully ENTER them back in. I suspect it has something to do with control code characters. I'm guessing that the ENTER command behaves just as if the user were typing from the keyboard. The problem with that of course is that the user would need to prepend control codes with the escape key to avoid them being interpreted literally, which I doubt the ENTER facility bothers to do. Anyway, does anyone know what the issue might be? Am I onto something or might it be something else? Solutions? Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted July 18, 2019 Share Posted July 18, 2019 I do not see any issue ENTERing code back in which includes quoted control characters here, at least with Atari BASIC and Altirra BASIC (have not tried BASIC-XL). You don't describe exactly what the symptoms of the problem are, however, so it's difficult to speculate. If only a few lines are failing to parse, it could be because they're too long. One preemptive solution would of course be to not delete the tokenised versions in the first place, which I find a baffling step. Quote Link to comment Share on other sites More sharing options...
Rybags Posted July 19, 2019 Share Posted July 19, 2019 Control codes shouldn't be an issue. It might be a line length problem. Using abbreviated commands or eliminating spaces can produce longer lines that can normally be entered and sometimes they have problems being ENTERed back in. You could check and edit any long ones by using that technique to shorten them. Quote Link to comment Share on other sites More sharing options...
fujidude Posted July 19, 2019 Author Share Posted July 19, 2019 Thanks guys for weighing in. I'll get some more detail in here. In the mean time, I really have to express my monumental gratitude to you FJC for bringing to my attention that preemptive solution! ? I believe you could only have done better if you had offered the solution of retyping everything in manually and saving tokenized. ? In all seriousness though, I do probably have some backups somewhere but still I really would like to use LISTed files for my source code in any case. I'll put together a bit more detail and put it forth in another post here. Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted July 19, 2019 Share Posted July 19, 2019 (edited) NEW POKE 82,0 then ENTER "DX:yourfile.txt" then save or list it out again... hopefully you didn't load into the word processor and the save back out to the same filenames... Edited July 19, 2019 by _The Doctor__ Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted July 19, 2019 Share Posted July 19, 2019 If you had a earlier basic versions ... listing out and entering back in was the only way to fix the ever expanding basic file bug.. Quote Link to comment Share on other sites More sharing options...
fujidude Posted July 19, 2019 Author Share Posted July 19, 2019 Thanks Doc and all. Well it turns out it was PEBCAK issue. Two unrelated issues had me thinking there was a problem with the LIST/ENTER procedure. The 1st issue, is that some of the LISTed files would cause XLESS to spaz out. The 2nd issue was when I tried to ENTER them into BASIC it seemed to get stuck so I would hit reset and only end up with a partial program brought in. I thought there was something strange about the files which were causing these problems. As it turns out, the only real problem I think is that XLESS has issues displaying some text files for some reason. The Last Word has no problems with them and even the regular version of LESS has no issues either after I checked that. The getting "stuck" entering the LISTed files in was an incorrect assumption on my part. It was never stuck, it was just taking quite a bit longer than I expected. I am able to repeatedly successfully ENTER in any of the files now if I just wait long enough for it to finish. For those interested about the XLESS issue, here is some info: SDX 4.9c (beta) XLESS (unknown version) All running under Altirra 3.20t9, which in turn is running under Wine x64 3.20 under Debian Stretch Linux. I should probably go to the SDX area & get into the XLESS thing there. Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted July 19, 2019 Share Posted July 19, 2019 7 hours ago, fujidude said: I believe you could only have done better if you had offered the solution of retyping everything in manually and saving tokenized. Well, the idea of keeping backups seemed well worth bringing up, since it was not obvious that the idea had occurred to you. 1 Quote Link to comment Share on other sites More sharing options...
Rybags Posted July 19, 2019 Share Posted July 19, 2019 The E: margin settings make no difference when ENTER or LISTing to a different device - they're only of help when actually typing in or editing the program. Quote Link to comment Share on other sites More sharing options...
thorfdbg Posted July 19, 2019 Share Posted July 19, 2019 The "ENTER" statement redirects the input channel for the basic parser from E: to whatever file was specified. This means first that the line margin has no impact on the result as it is only used by E: and not by any other handler. This also means that escaping control characters is not necessary, as only E: requires this when reading data from the keyboard. It is part of its input mechanism, and not part of any other handler. The only issue that could possibly apply is that the input line is too large for the basic line buffer - but it seems that the issue was resolved. Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted July 19, 2019 Share Posted July 19, 2019 Very useful for editing, when you bring the line in and basic puts error and what follows out, having the extra space to expand into helps me personally when doing an edit or fix up. Copying from E: to a device and control 3 to exit or taking an atascii screen you have drawn, saving the screen memory and then converting it back to atascii and having it all line up nicely. That's just me though. I have always done this, I do the same in SpartaDOS, terminals , anything that will allow it. all the BBS screens were done the same as well. It hurts nothing and only helps. Quote Link to comment Share on other sites More sharing options...
fujidude Posted July 19, 2019 Author Share Posted July 19, 2019 (edited) 12 hours ago, flashjazzcat said: Well, the idea of keeping backups seemed well worth bringing up, since it was not obvious that the idea had occurred to you. Your suggestion specifically was to not have deleted the tokenized versions in the 1st place, when in my original posting I said: Quote So I went ahead and deleted the binary tokenized versions. Oopsy; rather than just verify the listed files came out good, I should have also verified that the would ENTER back in okay. I don't know how much more obvious I could have been that I had already deduced your suggestion. I know you're a smart guy, so either you were having a brain fart or something else, but I'm quite positive that was obvious enough that even a trained monkey would have noticed. Honestly, when I first read and responded to your suggestion post, I figured you were being humorous by employing a bit of subtle sarcasm. That's why I responded with the "monumental thanks" bit; I too was attempting humor using sarcasm though a little less subtly. But to say you didn't think your suggestion had occurred to me, well that's just a bit bizarre. ? Edited July 19, 2019 by fujidude Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted July 19, 2019 Share Posted July 19, 2019 (edited) 29 minutes ago, fujidude said: But to say you didn't think your suggestion had occurred to me, well that's just a bit bizarre. If it had occurred to you at the opportune moment (the moment before you deleted the tokenised versions), you would not have deleted the tokenised versions and therefore wouldn't have had to wonder whether you had a backup somewhere (and wonder you clearly did, since you said as much in the thread). Other than that, I have no idea what point you're trying to make. It's taken as read that after deleting the only copy of something, everyone is going to think "Oh... I wish I hadn't deleted it". I'm not trying to suggest such a thought didn't occur to you after the event, since that would be dumb. But as with all matters of data integrity, backups, etc, the time to realise you shouldn't do dumb stuff is before you do dumb stuff, not afterwards. If that had been the case here, problems with ENTERing the untokenised code would have been purely academic. But they clearly weren't. The only brain fart that occurred was in your head, when you deleted the tokenised programs before ensuring the untokenised versions were readable. Edited July 19, 2019 by flashjazzcat Quote Link to comment Share on other sites More sharing options...
fujidude Posted July 19, 2019 Author Share Posted July 19, 2019 Jon, scolding someone for deleting files, especially when you know they already acknowledged it was unwise; well it's hard not to see that as either an attempt humor through subtle sarcasm, or an attempt to humiliate. I thought it was about humor, but it's honestly looking more like humiliation after this. I don't know, you tell me. Generally I'm fairly clever and careful, but I'm not perfect and I do sometimes make mistakes. I'm not ashamed to admit it, and don't feel the last bit humiliated. I guess what's concerning me is where you might be coming from on this; it seems a bit off. I invite you to follow up via PM if you are so inclined. Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted July 19, 2019 Share Posted July 19, 2019 No: I was just trying to pragmatically explain that I wasn't stating the obvious, having a 'brain fart', etc, but I can see that nothing good will come of it. I really enjoyed the opportunity to try and diagnose a common problem which turned out to be caused by issues with a completely undisclosed third-party tool, however. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.