SELECT CASES ???
#7
(10-16-2022, 09:12 PM)Pete Wrote: Two votes for cool, 1 vote yuck. Cool wins. When can we expect the roll out??? Big Grin

Pete

I dunno.  How quick can you push a pull request with the changes you've implemented for this into the repo, so we can reject them?  Big Grin

I imagine the roll out would probably be two days after never, after that!

Tongue

Kidding aside, I honestly don't think any developer would waste their time ever typing to adopt such a syntax into the language.  All we do with SELECT CASE is translate the SELECT CASES into IF.. THEN.. code already.  For example here's a simple SELECT CASE and it's translated code:

Code: (Select All)
Select Case x
    Case Is < 0
    Case Is = 0
    Case Is > 0
End Select

Code: (Select All)
if (((*__SINGLE_X<((float)( 0 ))))||new_error){
sc_ec_1_end:;
goto sc_1_end;
}
if (((*__SINGLE_X==((float)( 0 ))))||new_error){
sc_ec_2_end:;
goto sc_1_end;
}
if (((*__SINGLE_X>((float)( 0 ))))||new_error){
sc_ec_3_end:;
goto sc_1_end;
}
sc_1_end:;


Our SELECT CASE basic code gets translated into IF-THEN c code, when all is said and done.  As I mentioned above, if one *really* likes such a syntax as you showcased, why not just use IF-THEN directly and skip that step of QB64 having to translate from SELECT CASE to IF for you.  Wink
Reply


Messages In This Thread
SELECT CASES ??? - by Pete - 10-16-2022, 07:55 PM
RE: SELECT CASES ??? - by SMcNeill - 10-16-2022, 08:48 PM
RE: SELECT CASES ??? - by mnrvovrfc - 10-17-2022, 07:40 AM
RE: SELECT CASES ??? - by James D Jarvis - 10-16-2022, 08:49 PM
RE: SELECT CASES ??? - by SMcNeill - 10-16-2022, 09:07 PM
RE: SELECT CASES ??? - by Pete - 10-16-2022, 09:01 PM
RE: SELECT CASES ??? - by Pete - 10-16-2022, 09:12 PM
RE: SELECT CASES ??? - by SMcNeill - 10-16-2022, 09:23 PM
RE: SELECT CASES ??? - by Kernelpanic - 10-16-2022, 09:35 PM
RE: SELECT CASES ??? - by SMcNeill - 10-16-2022, 09:57 PM
RE: SELECT CASES ??? - by Pete - 10-16-2022, 10:28 PM
RE: SELECT CASES ??? - by Kernelpanic - 10-16-2022, 10:44 PM
RE: SELECT CASES ??? - by SpriggsySpriggs - 10-16-2022, 11:06 PM
RE: SELECT CASES ??? - by Pete - 10-16-2022, 11:42 PM
RE: SELECT CASES ??? - by SMcNeill - 10-17-2022, 01:34 AM
RE: SELECT CASES ??? - by Pete - 10-17-2022, 02:04 AM
RE: SELECT CASES ??? - by SpriggsySpriggs - 10-17-2022, 02:46 AM
RE: SELECT CASES ??? - by mnrvovrfc - 10-17-2022, 07:48 AM
RE: SELECT CASES ??? - by dbox - 10-17-2022, 03:46 AM
RE: SELECT CASES ??? - by SMcNeill - 10-17-2022, 05:21 AM
RE: SELECT CASES ??? - by DSMan195276 - 10-17-2022, 06:32 AM
RE: SELECT CASES ??? - by Pete - 10-17-2022, 06:41 AM
RE: SELECT CASES ??? - by DSMan195276 - 10-17-2022, 07:34 PM
RE: SELECT CASES ??? - by Pete - 10-17-2022, 08:28 AM
RE: SELECT CASES ??? - by RhoSigma - 10-17-2022, 09:29 AM
RE: SELECT CASES ??? - by Pete - 10-17-2022, 07:00 PM
RE: SELECT CASES ??? - by Kernelpanic - 10-17-2022, 08:15 PM
RE: SELECT CASES ??? - by SMcNeill - 10-17-2022, 09:44 PM
RE: SELECT CASES ??? - by Pete - 10-17-2022, 09:45 PM
RE: SELECT CASES ??? - by SMcNeill - 10-17-2022, 09:50 PM
RE: SELECT CASES ??? - by Pete - 10-17-2022, 10:05 PM
RE: SELECT CASES ??? - by Kernelpanic - 10-18-2022, 08:07 PM
RE: SELECT CASES ??? - by Pete - 10-18-2022, 08:38 PM
RE: SELECT CASES ??? - by Kernelpanic - 10-18-2022, 08:49 PM
RE: SELECT CASES ??? - by Pete - 10-18-2022, 09:33 PM
RE: SELECT CASES ??? - by Kernelpanic - 10-19-2022, 06:32 PM
RE: SELECT CASES ??? - by Pete - 10-19-2022, 06:39 PM



Users browsing this thread: 9 Guest(s)