DAY 011: REM - Printable Version +- QB64 Phoenix Edition (https://staging.qb64phoenix.com) +-- Forum: Official Links (https://staging.qb64phoenix.com/forumdisplay.php?fid=16) +--- Forum: Learning Resources and Archives (https://staging.qb64phoenix.com/forumdisplay.php?fid=13) +---- Forum: Keyword of the Day! (https://staging.qb64phoenix.com/forumdisplay.php?fid=49) +---- Thread: DAY 011: REM (/showthread.php?tid=1130) |
RE: DAY 011: REM - SMcNeill - 11-16-2022 (11-16-2022, 11:04 PM)Pete Wrote: This oversight upsets the Continuity Principle. The reason this isn't flagged by the IDE as an error, is simply because it's not. Code: (Select All) For i = 1 To 4 You've got mixed data inside your data stream there -- 2 numeric values and 2 string values. The error you get, happens to be a run-time error because, at run-time, you're trying to read a string into a numeric variable. Makes perfect sense to me. RE: DAY 011: REM - Pete - 11-16-2022 (11-16-2022, 11:13 PM)SMcNeill Wrote:(11-16-2022, 11:04 PM)Pete Wrote: This oversight upsets the Continuity Principle. Ah, I forgot that DATA can be read as either a STRING type or Var Type. Good point! Code: (Select All) FOR i = 1 TO 3 Also interesting that the RESERVED word REM can be used as a DATA element. So can the single quote. I'll go back and edit post 11 accordingly. Pete RE: DAY 011: REM - Dav - 11-17-2022 (11-16-2022, 10:13 PM)CharlieJV Wrote: Ooooh, that's a good catch. Good sleuthing. Sometimes when bored I'll play with the IDE for fun. I use to have a small list of odd IDE behaviors like the REM thing. Just a trivial things, but interesting to me. One I remember is the underscore plays havoc with the IDE correcting. You can put the _ anywhere. It stops the IDE from uppercasing/spacing of keywords. For example, the code below looks horrible, but the IDE accepts it as is and it runs ok. The IDE won't even turn the ? into PRINT. - Dav Code: (Select All) 1:::::for t=1to 15 _ RE: DAY 011: REM - SMcNeill - 11-17-2022 I've got to say -- completely off topic here -- that these topics astound me with the interest and number of replies they generate. REM... of all keywords... REM has over 3 pages of comments on it, and all it does is place a comment in the code! Honestly, I figured I'd post a few paragraphs on the topic, hear a resounding chirp of crickets, and be done with it until tomorrow's new word turned up and was maybe a little more interactive. Just goes to show -- you never know what'll draw the interest and conversation of the QB64-PE crowd! RE: DAY 011: REM - CharlieJV - 11-17-2022 (11-17-2022, 12:45 AM)Dav Wrote: Sometimes when bored I'll play with the IDE for fun. ...snip... I love programming, but programming is programming, software is software. Creating an IDE, though, is one of those things I think: that's a pretty special kind of art and science. Something I admire from afar. Appreciate fiercely, but no desire to ever attempt it. I appreciate those with the marbles (in every sense that can be taken) to build those things. RE: DAY 011: REM - Pete - 11-17-2022 (11-17-2022, 12:59 AM)SMcNeill Wrote: I've got to say -- completely off topic here -- that these topics astound me with the interest and number of replies they generate. REM... of all keywords... REM has over 3 pages of comments on it, and all it does is place a comment in the code! Honestly, I figured I'd post a few paragraphs on the topic, hear a resounding chirp of crickets, and be done with it until tomorrow's new word turned up and was maybe a little more interactive. I've been around long enough to know to expect exactly this. We used to get some of the longest threads at the QBasic forum over things you thought wouldn't even merit a complete... Pete RE: DAY 011: REM - Dav - 11-17-2022 I apologize for getting off topic. Thanks for posting these keyword threads. They are very helpful. I’ve read every one. Keep’em coming! - Dav RE: DAY 011: REM - mnrvovrfc - 11-17-2022 (11-17-2022, 12:45 AM)Dav Wrote: ... I use to have a small list of odd IDE behaviors like the REM thing. Just a trivial things, but interesting to me. One I remember is the underscore plays havoc with the IDE correcting. You can put the _ anywhere. ...I just tried this. Pinning the "to" instead to "15" causes a flag. I thought removing the line number "1" would have broken the peace. There are people still using question marks for "PRINT". Sadly, the row of colons would still have to be supported because ancient code did stuff like that if there was enough RAM, to visually delimit the subroutines. Man I hated a "GOSUB" statement having a line number that pointed to a comment! Those programmers hating renumbering their programs too. Not as much "GOTO" because "GOSUB" represented a need that was filled in nicely by QuickBASIC, so nicely that in M$'s brand in 2005 "GOSUB" was ditched and "RETURN" was changed to do something else. RE: DAY 011: REM - Pete - 11-17-2022 I always use ? for PRINT, but then again I use Jello for... never mind. Pete RE: DAY 011: REM - TerryRitchie - 11-17-2022 (11-17-2022, 12:59 AM)SMcNeill Wrote: I've got to say -- completely off topic here -- that these topics astound me with the interest and number of replies they generate. REM... of all keywords... REM has over 3 pages of comments on it, and all it does is place a comment in the code! Honestly, I figured I'd post a few paragraphs on the topic, hear a resounding chirp of crickets, and be done with it until tomorrow's new word turned up and was maybe a little more interactive. Keep these word of the days coming. I read every one. I constantly miss little nuggets associated with key words. You would think REM wouldn't get any second thought but I'm like the king of comments in my code. I'm always looking for better/different ways of adding comments. Something I like that other languages offer is block commenting, like C /* */ Early Pascal had them too (* *) but were replaced later on in Delphi by { } Now, if there is one thing I wish the QB64 editor would not do when dealing with comments is this: Important line of code here ' My comment Another important line ' My comment I would much rather the IDE left the single quote where I place it, like this: Important line of code here ' My comment Another most important line ' My comment Instead of forcing the single quote to the end of the line. |