+Random Terrain Posted May 9, 2020 Share Posted May 9, 2020 Back in the 1980s, it seemed like just about every BASIC book used if-then, but on the Internet, it seems like if…then with an ellipsis is used more often, so I switched to using an ellipsis too. The problem is that if-then is much easier to type in and search for on a web page. I'm never going to memorize the Alt code for an ellipsis (Alt 0133), so I have to copy and paste any time I want to search the page for "if…then." Does anyone have a problem with me changing if…then to if-then on the BASIC-related pages on my web site? Quote Link to comment Share on other sites More sharing options...
Mr SQL Posted May 9, 2020 Share Posted May 9, 2020 … is an actual character instead of ...? Pretty cool RT! I just did Alt 0133 to try that I bet Google is likely able to match the three ASCII characters against the Ellipsis, maybe you could add both forms with one hidden to make it easier to find on your BASIC pages. Check out page 40 of the Radio Shack Color BASIC manual: https://colorcomputerarchive.com/repo/Documents/Manuals/Hardware/Getting Started With Extended Color Basic (Tandy).pdf They use an ellipsis, but I think it's the three ASCII period characters and not a single character. What's strange though is in the back of that chapter though and throughout the book they use mathematical notation with THEN the denominator and IF the enumerator: IF/THEN 1 Quote Link to comment Share on other sites More sharing options...
freshbrood Posted May 13, 2020 Share Posted May 13, 2020 Speaking of if.. I've been told not to use 2 or more in the same line. Why? For example: if player1y<76 then e=14 : if f{1} then e=13 vs if player1y<76 then e=14 if player1y<76 && f{1} then e=13 ----------------------------------------------- Both of these examples seem to work perfectly fine in my code. The top example uses less memory. But I have been advised to never use 2 or more if statements on the same line. Why? Is it because it's generally bad practice and can lead to confusing code? Or does it actually cause a glitch and make the game crash upon reading? Because in terms of memory usage, if the top line reads correctly every time, obviously it would be preferable. 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.