BAM thingies in the works - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: QBJS, BAM, and Other BASICs (https://qb64phoenix.com/forum/forumdisplay.php?fid=50) +--- Thread: BAM thingies in the works (/showthread.php?tid=1715) Pages:
1
2
|
RE: BAM thingies in the works - mnrvovrfc - 06-07-2023 (06-07-2023, 04:23 AM)CharlieJV Wrote: Some things need to be done to get the programming running correctly. Compatibility problems with things BAM does not support 100% (like SLEEP with no value.) RE: SLEEP without a value: If INKEY$ works on this system like in QB64: Code: (Select All) DO : LOOP UNTIL INKEY$ = "" In QB64 would have to insert a _LIMIT executed by the second loop, otherwise it would hog the CPU. That code snippet could be put inside a subprogram, and that subprogram's name used in place of "standalone" SLEEP. EDIT: probably you mean the keypress should be retained after it's processed. That is harder to emulate, might have to depend on a variable that holds the last return from INKEY$, and make sure that it comes from what should have been "standalone" SLEEP. RE: BAM thingies in the works - CharlieJV - 06-07-2023 (06-07-2023, 08:45 AM)mnrvovrfc Wrote:(06-07-2023, 04:23 AM)CharlieJV Wrote: Some things need to be done to get the programming running correctly. Compatibility problems with things BAM does not support 100% (like SLEEP with no value.) Yup, for sure although I prefer this: Code: (Select All) HOLD$ = INPUT$(1) RE: BAM thingies in the works - bplus - 06-07-2023 https://qb64phoenix.com/forum/showthread.php?tid=1715&pid=16467#pid16467 @vince are you taking coding lessons from ARB? LOL! RE: BAM thingies in the works - vince - 06-07-2023 (06-07-2023, 03:19 PM)bplus Wrote: @vince are you taking coding lessons from ARB? LOL!I miss him so much! RE: BAM thingies in the works - CharlieJV - 06-07-2023 (06-07-2023, 04:12 AM)CharlieJV Wrote:(06-07-2023, 02:50 AM)vince Wrote: do you think there's anyway I could get this QB program to run in BAM?Nested IF-THEN in one line (in your loop) will have to be replaced. System statements: replace those with END statements. Still reviewing ... Huh, paint me green and call me Gumby... Nested single-line IF-THEN seems to work A-1 in BAM. That said, I'm not all that crazy about it re readability. The outer IF statement cannot have an ELSE statement, I think. I'll have to test a bit more. RE: BAM thingies in the works - CharlieJV - 06-08-2023 (Added a link to test version of BAM in the OP.) Here's a sample use case and test program for BETWEEN, CHOOSE, and IFF: Code: (Select All) ' Test BETWEEN, CHOOSE, IFF RE: BAM thingies in the works - CharlieJV - 06-10-2023 By fluke, I discovered that the interpreter big-time chokes when a sub/function is declared but never defined. Way too big a pain in the caboose to fix in the interpreter, so I'm setting up the IDE to raise the red flag when there are issues, and provide details to help resolve issues. RE: BAM thingies in the works - CharlieJV - 06-24-2023 Currently, BAM's SLEEP statement requires the argument (a value in seconds), and does not know what to do with zero. In the upcoming version of BAM, both no parameter and zero parameter will trigger a program to pause until user interaction with the program (either a key press on the keyboard or click/touch of the screen). RE: BAM thingies in the works - CharlieJV - 06-24-2023 INSTR currently allows only two arguments: the source string and the substring. Upcoming version of BAM sill support start position of search: RE: BAM thingies in the works - CharlieJV - 06-24-2023 About the (already existing) WIDTH and the (upcoming) HEIGHT statements BAM's WIDTH statement sets the number of character columns for the current screen mode. Any screen mode, and any number of columns (not limited to 40 and 80). BAM's HEIGHT statement sets the number of character rows for the current screen mode. These statements alter the pixel width and pixel heights of the current screen mode, and will accordingly impact graphics statements (because of the change in number of pixels. When a program is focused on graphics, use SCREEN _NEWIMAGE(pixel-width, pixel-height, screen_mode) to setup the screen. Fonts for screen modes being 8x8 pixels (or 8x16 pixels in some modes), the number of columns and rows of text will depend on the pixel-width and pixel-height of the screen. When a program is focused on text, use WIDTH and HEIGHT to setup the screen for the current screen mode. You can try this stuff out with the current TEST VERSION of BAM. |