JavaScript-ing it, I need to get with it - 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: JavaScript-ing it, I need to get with it (/showthread.php?tid=1061) Pages:
1
2
|
JavaScript-ing it, I need to get with it - mnrvovrfc - 11-06-2022 https://staging.qb64phoenix.com/showthread.php?tid=969&pid=9266#pid9266 This thread exists because I didn't want to reply to that post, and I selfishly didn't want to post on the dedicated thread about the subject. Good job with this project, surprised that it's as deep as it is in such a short time. Normally I don't like stunts done by clunky web browsers but this interested me. I visited the page on Github to learn about support for QB64(PE) keywords. These are just my observations.
A few other things: Sub parameters are passed only by value: this is one reason why I'll have difficulty with this package. LOL I like using "SUBs" instead of "FUNCTIONs" to return values, especially more than one value since I also like to program in Lua. "GOSUB... RETURN" not supported: yeech! Function return could be array, associative arrays support: don't need unless the above two are fixed! Errm... I understand the tendency toward Visual Basic, but I guess this isn't for converting programs created before M$ came up with that product. No spaghetti code allowed! Also give them no choice with "OPTION _EXPLICIT" always enabled. Some people with bad habits made by Q(uick)BASIC are going to be alienated, however. As I've said, these are just observations (opinions). RE: JavaScript-ing it, I need to get with it - SMcNeill - 11-06-2022 https://qb64phoenix.com/qb64wiki/index.php/SELECT_CASE -- QB64 supports SELECT EVERYCASE as well, just FYI. RE: JavaScript-ing it, I need to get with it - mnrvovrfc - 11-06-2022 (11-06-2022, 03:56 PM)SMcNeill Wrote: https://qb64phoenix.com/qb64wiki/index.php/SELECT_CASE -- QB64 supports SELECT EVERYCASE as well, just FYI.Thank you for the heads up! This is a lot like not using "break;" in "switch()" in C. RE: JavaScript-ing it, I need to get with it - CharlieJV - 11-06-2022 I wanted to be careful not to clutter this thread, so I created the "Thoughts on BAM and QBJS (etc.)" thread as a kind of sidebar discussion in case there is interest in that. RE: JavaScript-ing it, I need to get with it - Pete - 11-06-2022 (11-06-2022, 03:56 PM)SMcNeill Wrote: https://qb64phoenix.com/qb64wiki/index.php/SELECT_CASE -- QB64 supports SELECT EVERYCASE as well, just FYI. And soon Steve will be adding the even more powerful keyword, SELECT CASES What Tuesday will that one premier on again, Steve? Pete RE: JavaScript-ing it, I need to get with it - PhilOfPerth - 11-07-2022 From my (very) limited knowledge, Select EveryCase would be different from Case Else, in that it would also include the cases already selected. Not sure of an application for this though. RE: JavaScript-ing it, I need to get with it - Pete - 11-07-2022 Code: (Select All) INPUT "Input 1, 2, or 3: "; a RE: JavaScript-ing it, I need to get with it - CharlieJV - 11-07-2022 (11-07-2022, 01:03 AM)Pete Wrote: I think I'm more confused than I was before. (But that easy to me happens.) What does "SELECT EVERYCASE" do vs "SELECT CASE" ? RE: JavaScript-ing it, I need to get with it - Pete - 11-07-2022 SELECT CASE moves the program flow through just one condition in the block. SELECT EVERYCASE moves your program flow through every case in the block that is true. SELECT EVERYCASE is therefore useful during some instances where the coder would otherwise need to add more conditional statements to handle all possible conditions. Pete RE: JavaScript-ing it, I need to get with it - mnrvovrfc - 11-07-2022 One has to pretend there is a forced "FALLTHROUGH" keyword, while "SELECT EVERYCASE" didn't exist. Because that's what it would have required otherwise. Code: (Select All) INPUT "Input 1, 2, or 3: "; a When "SELECT CASE... END SELECT" was invented, it could have been fashioned just like "switch()" in C, thus requiring "EXIT SELECT" or "BREAK" statement at the end of each "CASE" block. The opposite is true. But the need arose where fallthrough was needed, either potentially for all cases above "CASE ELSE", or for just "CASE ELSE". I'm taking my own topic off course... but the QBJS listing of supported QB64 keywords got my attention about a few things. |