Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Option _Explicit Keyword(s) of day XXX:
#9
(06-07-2023, 02:09 PM)Kernelpanic Wrote:
(06-04-2023, 04:38 PM)TerryRitchie Wrote: I added OPTION _EXPLICIT yesterday to Lesson2: Introducing Variables in the tutorial:

https://www.qb64tutorial.com/lesson2

I used Steve's Cheetos example too Smile
@Terry (and @bplus) a constant is just an ordinary variable that can be accidentally changed without the Option Explicit.

From your tutorial:
[Image: Terry-Const-ohne-Option-P-07-2023.jpg]

KP "@Terry (and @bplus) a constant is just an ordinary variable that can be accidentally changed without the Option Explicit."

And once again I say that if you declare a variable a Const, you don't need Option _Explicit to tell you you messed up when you try to use it like a REAL variable, see here!:
Code: (Select All)
Const i = 1
for i = 1 to 10
? i
next
   

As you can plainly see the IDE ain't buying your blunder!

@KernelPanic that's it from me for you on this subject.
  724  855  599  923  575  468  400  206  147  564  878  823  652  556 bxor cross forever
Reply


Messages In This Thread
RE: Option _Explicit Keyword(s) of day XXX: - by bplus - 06-07-2023, 02:58 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Keyword of the Day 45: _PIXELSIZE SMcNeill 1 873 01-03-2023, 07:41 PM
Last Post: SpriggsySpriggs

Forum Jump:


Users browsing this thread: 2 Guest(s)