Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
blue circle isn't drawing and print isn't working?
#11
(09-21-2024, 04:05 AM)madscijr Wrote: It's single because that's the default type for an unsuffixed variable not explicitly DIMmed as something else. 
The default can be changed with the DEF{type} command, e.g., DEFLNG for long. 
Is that right?

Exactly. And that's basically what your original issue was. You had this basic code:

DIM x~&
x = 123

So the x you were using was SINGLE (which won't hold blue color channels due to rounding in scientific notation), even though all your DIM statements were for x~&.

Option Explicit would've caught the issue for you in a second. Wink
Reply
#12
(09-21-2024, 05:40 AM)SMcNeill Wrote: Option Explicit would've caught the issue for you in a second.  Wink
The very reason I never program without OPTION _EXPLICIT as the first line of code.
New to QB64pe? Visit the QB64 tutorial to get started.
QB64 Tutorial
Reply
#13
(09-21-2024, 12:10 PM)TerryRitchie Wrote:
(09-21-2024, 05:40 AM)SMcNeill Wrote: Option Explicit would've caught the issue for you in a second.  Wink
The very reason I never program without OPTION _EXPLICIT as the first line of code.
I usually use it myself, was just rushing here! 
It's a very helpful tool for avoiding some of these issues right out of the gate.
Reply




Users browsing this thread: 2 Guest(s)