Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
option explicit
#6
(01-23-2026, 03:24 AM)Unseen Machine Wrote: To me the suffix dims it as i use it so KB$ = or ANum& = etc...FORCING ME to declare a value implicitly before i can inference it is just as mad as linking unused libs when compiling! 

youre tired so youll agree! 

Me

Reread what I was saying.

Using ANum& is all fine and dandy.  But will your tired eyes notice it when you type ANun& in the middle of a line of code that scrolls across the screen, in the middle of a 2000 line subroutine what's nothing but math and formula and calculations?

What about when you have a variable called Gray = _RGB(128, 128, 128) and then in you code you want to LINE (x,y)-STEP(w,h), Grey, BF?

Will your brain even pick out that you've screwed up on that line?  Or are you going to spend endless hours trying to debug what's working 100% perfectly -- just not as you intended.

The code isn't broke.  There's nothing for the IDE to catch.  No way to warn you or scream at you or slap you upside the head.

You'll spend countless hours screaming, "WHY!  OH GOD WHY!!  WTF IS WRONG WITH THIS!!!!!"  

And one Option _Explicit would have told you the problem instantly.
Reply


Messages In This Thread
option explicit - by Unseen Machine - 01-23-2026, 02:55 AM
RE: option explicit - by SMcNeill - 01-23-2026, 03:11 AM
RE: option explicit - by Unseen Machine - 01-23-2026, 03:24 AM
RE: option explicit - by ahenry3068 - 01-23-2026, 03:29 AM
RE: option explicit - by SMcNeill - 01-23-2026, 04:26 AM
RE: option explicit - by madscijr - 01-23-2026, 03:38 AM
RE: option explicit - by Unseen Machine - 01-23-2026, 04:39 AM
RE: option explicit - by SMcNeill - 01-23-2026, 05:54 AM
RE: option explicit - by Unseen Machine - 01-23-2026, 05:58 AM
RE: option explicit - by Pete - 01-23-2026, 06:27 AM
RE: option explicit - by bplus - 01-23-2026, 07:37 AM
RE: option explicit - by luke - 01-23-2026, 08:18 AM
RE: option explicit - by Magdha - 01-23-2026, 11:59 AM
RE: option explicit - by ahenry3068 - 01-23-2026, 02:43 PM
RE: option explicit - by grymmjack - 01-23-2026, 03:56 PM
RE: option explicit - by OldMoses - 01-23-2026, 04:13 PM
RE: option explicit - by madscijr - 01-23-2026, 06:19 PM
RE: option explicit - by dano - 01-25-2026, 12:40 PM
RE: option explicit - by madscijr - 01-25-2026, 07:32 PM
RE: option explicit - by Unseen Machine - 01-26-2026, 12:02 AM
RE: option explicit - by bplus - 01-26-2026, 03:09 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  An option to not need _GL sub Unseen Machine 4 1,081 10-17-2025, 02:41 PM
Last Post: Unseen Machine
  Found a BUG with the QB64 editor compiled with the -O3 option Coolman 2 851 06-02-2022, 06:27 PM
Last Post: Coolman
  A preview of a new QB64 option SMcNeill 12 2,751 05-04-2022, 01:11 PM
Last Post: DSMan195276

Forum Jump:


Users browsing this thread: 1 Guest(s)