"WITH" keyword - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: Chatting and Socializing (https://qb64phoenix.com/forum/forumdisplay.php?fid=11) +--- Forum: General Discussion (https://qb64phoenix.com/forum/forumdisplay.php?fid=2) +--- Thread: "WITH" keyword (/showthread.php?tid=2110) Pages:
1
2
|
RE: "WITH" keyword - SMcNeill - 10-20-2023 Posts merge if you double post within just a minute or two, as long as no one else has posted after you. It basically treats a double post as an edit to the first post. RE: "WITH" keyword - bplus - 10-20-2023 (10-20-2023, 05:41 PM)SMcNeill Wrote: Posts merge if you double post within just a minute or two, as long as no one else has posted after you. It basically treats a double post as an edit to the first post. I was going for a triple maybe later ;-)) Maybe now! With this!!! RE: "WITH" keyword - bplus - 10-20-2023 Hehe! RE: "WITH" keyword - mnrvovrfc - 10-20-2023 (10-20-2023, 04:18 PM)RhoSigma Wrote: The only thing I've to say about: QB64 is already well on its way of faking other languages. With the sort-of preprocessor it has. That was my proposal. Then it would be the programmer's choice if he/she wants to dress up BASIC like Python or something else. `ALIAS` might have to become `$ALIAS` instead. Otherwise the name is confusing. Another BASIC straight out uses `TYPE` but it's not reasoned as part of preprocessing, which is interesting. RE: "WITH" keyword - madscijr - 10-26-2023 (10-19-2023, 07:17 PM)SpriggsySpriggs Wrote: Have there been any thoughts on making a "WITH" keyword for QB64 for assigning values to UDT members? I would not be opposed to WITH, if and only if, the QB64PE IDE included a command to auto-fill in the explicit variable name in a selected code block. Because I personally don't like reading through code inside a WITH - it's easier for my brain to visualize what's happening by seeing the actual variable name. I like Steve's alias suggestion, as long as we don't go crazy with it, and start adding all kinds of complicated things (aliased types, etc.) Just my own personal preference! RE: "WITH" keyword - James D Jarvis - 10-27-2023 Just don't make it so long or shorten it when you are working in a sub or function where the work gets done. Type areallyridiculosulylongUDTthathasaridiculouslynamedtype_type x as long y as long end type dim thevariabelewithareallyridiculosulylongUDTthathasaridiculouslynamedtype(100) as areallyridiculosulylongUDTthathasaridiculouslynamedtype_type .... addtoX 12, thevariabelewithareallyridiculosulylongUDTthathasaridiculouslynamedtype(i) ... sub addtoX(N as long,v as areallyridiculosulylongUDTthathasaridiculouslynamedtype_type) v.x=v.x+N end sub RE: "WITH" keyword - madscijr - 10-27-2023 (10-27-2023, 04:01 PM)James D Jarvis Wrote: Just don't make it so long or shorten it when you are working in a sub or function where the work gets done.That'll work too! :-D |