_NEWIMAGE() should be fixed to always take 3 parms - 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: _NEWIMAGE() should be fixed to always take 3 parms (/showthread.php?tid=1086) Pages:
1
2
|
_NEWIMAGE() should be fixed to always take 3 parms - mnrvovrfc - 11-09-2022 If two parameters are given to "_NEWIMAGE()" and any graphics command is called (in the program below "PSET") the program gives an error box which, if not taken seriously, the program hangs for a moment then terminates, writing on the terminal "killed". The source code was something I found from the "dot-com" forum that was meant for "QBJS" and not on Linux. Code: (Select All) ''by "mikesharpe" from qb64-dot-com forum My other addition to the original program was "_DISPLAY" just above "_LIMIT" so this was more tolerable. RE: _NEWIMAGE() should be fixed to always take 3 parms - bplus - 11-09-2022 +1 don't know how many times I've forgotten the third and crashed! Would be nice to just throw an error. RE: _NEWIMAGE() should be fixed to always take 3 parms - mnrvovrfc - 11-09-2022 I said the source code I listed might have been meant for "QBJS" but got confused by another post made by the user of the other forum. I just went into "QBJS" and it complains "Missing or unsupported method" for "LINE" and "PSET", so I can't understand why that source code was provided with "_NEWIMAGE()" being given only two parameters and maybe never tested. The warning is given whether or not "_NEWIMAGE()" has two or three parameters, it's simply that "QBJS" doesn't support those graphics statements yet. Maybe I should have started this thread on the new sub-forum. However, this is a possibility for code that perhaps was composed first in "BAM" or "QBJS", and then somebody tries to run it on QB64(PE). RE: _NEWIMAGE() should be fixed to always take 3 parms - bplus - 11-09-2022 OK yeah vince code worked without the 3rd parameter in QBJS, I think, the hypercube that PhilOfPerth noted.. but still an error thrown is better than crashing in regular IDE QB64pe. RE: _NEWIMAGE() should be fixed to always take 3 parms - dbox - 11-09-2022 Quote:… it's simply that "QBJS" doesn't support those graphics statements yet. Interesting… Line and PSet are supported in QBJS. I was able to run the program above in QBJS with no errors. RE: _NEWIMAGE() should be fixed to always take 3 parms - bplus - 11-09-2022 Confirmed but on Windows: RE: _NEWIMAGE() should be fixed to always take 3 parms - SpriggsySpriggs - 11-09-2022 Oh, cool. Are we making a torus? RE: _NEWIMAGE() should be fixed to always take 3 parms - SMcNeill - 11-09-2022 (11-09-2022, 02:05 PM)mnrvovrfc Wrote: If two parameters are given to "_NEWIMAGE()" and any graphics command is called (in the program below "PSET") the program gives an error box which, if not taken seriously, the program hangs for a moment then terminates, writing on the terminal "killed". This isn't as "broken" as you assume. Code: (Select All) Screen _NewImage(80, 40) 800 characters wide, 600 rows high.. I can see where that would push the limits of what's possible and terminate without much warning. RE: _NEWIMAGE() should be fixed to always take 3 parms - mnrvovrfc - 11-09-2022 (11-09-2022, 05:21 PM)dbox Wrote:I had forgotten to post on the sub-forum that KDE Falkon might not be a supported web browser. It doesn't look like it's based on Chromium as I've been misled to believe until now. I tried it on EndeavourOS (Arch-based) XFCE but with Falkon instead of the provided Firefox as web browser.Quote:… it's simply that "QBJS" doesn't support those graphics statements yet. RE: _NEWIMAGE() should be fixed to always take 3 parms - bplus - 11-09-2022 (11-09-2022, 05:58 PM)SMcNeill Wrote:(11-09-2022, 02:05 PM)mnrvovrfc Wrote: If two parameters are given to "_NEWIMAGE()" and any graphics command is called (in the program below "PSET") the program gives an error box which, if not taken seriously, the program hangs for a moment then terminates, writing on the terminal "killed". Oh yeah, it's when I try and use 1200 pixels wide and whatever high and forget the 3rd that's when it gets bad! |