Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Centering text inside char bax
#13
That's why I mentioned it's best to just forget that $NoPrefix exists.  Even in Bplus's example here, he has a Sub called MessageBox.  By itself, it doesn't conflict with anything in QB64.  Once $NoPrefix is added into the mix though, it errors out as there is a command called _MessageBox (and the no prefix version of it would be MessageBox).

$NoPrefix is just asking to open a can of worms to make your code hard to maintain and preserve for longevity's sake.  For ages, I've had a SaveImage library which I've shared for folks to use.  If QB64 adds a _SaveImage command in a year or so, there wouldn't be any issues or compatibility problems as there'd be a difference in the underscored and reserved QB64 command, verses my personal routine.   Once $NoPrefix enters the situation, however, then all sorts of problems poop up, requiring a rewrite of something to resolve the conflict.

Personally, I'm just never going to use $NoPrefix, nor ever code with it, and if there's an incompatibility with one of my routines or libraries due to it, I'm leaving it up to the end-user of that library to sort it out and deal with it.  $NoPrefix compatibility isn't anywhere on my list of things of even considering when coding.  The underscores are there in QB64 keywords to prevent any issues from arising like such, and if someone wants to sidestep those protections just to save typing a bit, then I feel its on them to sort out the conflict and not me.  Wink
Reply


Messages In This Thread
Centering text inside char bax - by bplus - 04-08-2023, 05:05 PM
RE: Centering text inside char bax - by mnrvovrfc - 04-08-2023, 06:05 PM
RE: Centering text inside char bax - by bplus - 04-08-2023, 11:44 PM
RE: Centering text inside char bax - by bplus - 04-09-2023, 12:25 AM
RE: Centering text inside char bax - by mnrvovrfc - 04-10-2023, 12:27 PM
RE: Centering text inside char bax - by bplus - 04-10-2023, 03:01 PM
RE: Centering text inside char bax - by bplus - 04-10-2023, 03:10 PM
RE: Centering text inside char bax - by SMcNeill - 04-11-2023, 05:38 PM
RE: Centering text inside char bax - by OldMoses - 04-11-2023, 05:22 PM
RE: Centering text inside char bax - by mnrvovrfc - 04-11-2023, 07:10 PM
RE: Centering text inside char bax - by SMcNeill - 04-11-2023, 11:31 PM
RE: Centering text inside char bax - by OldMoses - 04-12-2023, 12:44 AM



Users browsing this thread: 3 Guest(s)