• Print

Author Topic: $1 Offer  (Read 1074 times)

Mrwhy

  • Hero Member
  • *****
  • Posts: 2890
  • My Dad called me Mr Why when I was 5.
    • Email
Re: $1 Offer
« Reply #30 on: October 27, 2011, 02:36:41 AM »
Quote from: DeeBee on October 26, 2011, 08:28:23 PM
Sure, right after you show me where someone says it is not.


DeeBee, it makes this forum interesting when folk make clear who they are talking to and what about and possibly which thread they might be replying to ;D

DeeBee

  • Sr. Member
  • ****
  • Posts: 491
    • Donnelly-House
    • Email
Re: $1 Offer
« Reply #31 on: October 27, 2011, 03:28:16 AM »
It was right after your post, so it should have been evident.
(and I think it was to you, so I'm not quite sure what your point is)

Except possibly to certain immature ignoramuses who exhibit
little common decency and no common sense, or programming sense,
who shall remain nameless.

vrensul

  • Sr. Member
  • ****
  • Posts: 320
  • 44th Degree Digital Wizard of the HighBytes Order
Re: $1 Offer
« Reply #32 on: October 27, 2011, 03:50:38 AM »
There seems to be a good mix of people for it and against it.  Bottom line is it doesn't matter until Galleon says something.  DeeBee, have you posted this to his blog section yet?  That's where it'll have to be settled.  (unless some one writes it on their own.)
' With programming, you  can do anything!
DEF SEG = &HBANKACNT 'weekend starts here...
     poke checking, 1000000
DEF SEG ' quit job here.

DeeBee

  • Sr. Member
  • ****
  • Posts: 491
    • Donnelly-House
    • Email
Re: $1 Offer
« Reply #33 on: October 27, 2011, 03:51:15 AM »
Oh, I forgot to add QB64 to the list of OPTION EXPLICIT BASIC's above,
for when I get that feature added.

Then all will be right in the world.

 ;D

OlDosLover

  • Hero Member
  • *****
  • Posts: 3859
  • OlDosLover
    • Email
Re: $1 Offer
« Reply #34 on: October 27, 2011, 04:30:14 AM »
Hi all,
    I think he has asked a reasonable question.
Quote
That's why MOST languages have strong type checking,
either by default, or as an OPTION.
Just because it's there doesn't mean you have to use it.
That's the point.
    If its an option then no one is forced to use it just like OPTION BASE 1. Even if it ends up being the very last thing considered to be included in the IDE after all the other more important things are considered and added , it is a valid request like any other. I see no definitive reason for it not to be implemented and think it would be a good addition. Its possible i may never need it but its also possible that it may be a very worthwhile addition. Its up to the owner of the project to decide on these things after at least considering what the community thinks and then making a decision. In that respect allow the questioner to ask.
OlDosLover.

DeeBee

  • Sr. Member
  • ****
  • Posts: 491
    • Donnelly-House
    • Email
Re: $1 Offer
« Reply #35 on: October 27, 2011, 04:48:55 AM »
Here's something that's already implemented,
that I never noticed until now:
(because I'm such a 'perfect' programmer 8) )

OPTION I_DON'T_THINK_SO (p.s. this is not an actual QB64 statement)

If you try to declare a variable of the same name, like:

Code: [Select]
DIM nFG AS INTEGER
DIM nFG AS INTEGER

it gives you an error of: "Name already in use on line 2"

Well, that's just wrong, right? ;)

(damn QB64 telling me what to do!!! forcing me to do stuff!!! ;D )

(sorry, I couldn't pass it up.... or let it go :D ....maybe someday....)

Clippy

  • Hero Member
  • *****
  • Posts: 16431
  • I LOVE π = 4 * ATN(1)    Use the QB64 WIKI >>>
    • Pete's Qbasic Site
    • Email
Re: $1 Offer
« Reply #36 on: October 27, 2011, 08:17:21 AM »
SEE, you should have noticed that stuff before you started whining...
QB64 WIKI: Main Page
Download Q-Basics Code Demo: Q-Basics.zip
Download QB64 BAT, IconAdder and VBS shortcuts: QB64BAT.zip
Download QB64 DLL files in a ZIP: Program64.zip

vrensul

  • Sr. Member
  • ****
  • Posts: 320
  • 44th Degree Digital Wizard of the HighBytes Order
Re: $1 Offer
« Reply #37 on: October 27, 2011, 08:28:48 AM »
That's not the same thing as option explicit though.
' With programming, you  can do anything!
DEF SEG = &HBANKACNT 'weekend starts here...
     poke checking, 1000000
DEF SEG ' quit job here.

Clippy

  • Hero Member
  • *****
  • Posts: 16431
  • I LOVE π = 4 * ATN(1)    Use the QB64 WIKI >>>
    • Pete's Qbasic Site
    • Email
Re: $1 Offer
« Reply #38 on: October 27, 2011, 09:04:47 AM »
What is it then? OPTION DUPLICIT?  ;D
QB64 WIKI: Main Page
Download Q-Basics Code Demo: Q-Basics.zip
Download QB64 BAT, IconAdder and VBS shortcuts: QB64BAT.zip
Download QB64 DLL files in a ZIP: Program64.zip

vrensul

  • Sr. Member
  • ****
  • Posts: 320
  • 44th Degree Digital Wizard of the HighBytes Order
Re: $1 Offer
« Reply #39 on: October 27, 2011, 12:20:44 PM »
Quote
OPTION DUPLICIT?
AAAAA!!!!  LOSS OF FREEDOM!!!  I should be able to dim the same variable  15000 times if I want to!  What's this nonsense being FORCED on me!   ;)
' With programming, you  can do anything!
DEF SEG = &HBANKACNT 'weekend starts here...
     poke checking, 1000000
DEF SEG ' quit job here.

Galleon

  • Administrator
  • Hero Member
  • *****
  • Posts: 4664
  • QB Forever
    • Email
Re: $1 Offer
« Reply #40 on: October 27, 2011, 12:29:08 PM »
I'm against supporting 2 competing styles of coding, primarily because it makes code written in one incompatible with the other and secondly because it creates artificial 'levels' within QB64 users. I never want to hear things like "I like your function, but because I use OPTION EXPLICIT I am unable to use it in my programs without extensive changes. Could you please repost/edit it to have all variables explicitly dimensioned? Then all of the QB64 community could use it."

I'm against anything that makes implicit style coding less valid. However, I 100% support the idea of an IDE that changes the color of variables at the point where they are defined, be it implicitly or explicitly, and I believe this is the most appropriate way for QB64 to deal with the primary reason why OPTION EXPLICIT was added to BASIC in the first place.
Something old... Something new... Something borrowed... Something blue...

DeeBee

  • Sr. Member
  • ****
  • Posts: 491
    • Donnelly-House
    • Email
Re: $1 Offer
« Reply #41 on: October 27, 2011, 01:40:03 PM »
Quote from: Galleon on October 27, 2011, 12:29:08 PM
{snip}
I never want to hear things like "I like your function, but because I use OPTION EXPLICIT I am unable to use it in my programs without extensive changes.
{snip}

That's not the way it works.

You are NEVER required to use Option Explicit.

Ideally, you shouldn't put OPTION EXPLICIT in some source library
except when you are in development.

And even then, it should go in the primary program file, not any include files.
(it doesn't matter if it is in compiled libraries -- it is a compile-time option)

You could always make it illegal in include files. That would be a little weird,
but I could see it, I suppose. You would probably be trying too hard to protect people
from themselves too much, and hampering programmers.

People can always go in and remove the Option Explicit from the included
BASIC source file 'library', or turn it off after inclusion with -OPTION EXPLICIT,
or you could make it a per-file usage, although, on second thought, that would be bad.

Maybe part of the problem is people not understanding what Option Explicit
really is, what it really does, how it's actually used, and the benefits it provides.

I think the syntax would be:

Code: [Select]
'OPTION EXPLICIT
' or
'-OPTION EXPLICIT

or

Code: [Select]
'$OPTION EXPLICIT
' or
'$-OPTION EXPLICIT
« Last Edit: October 27, 2011, 01:55:43 PM by DeeBee »

Clippy

  • Hero Member
  • *****
  • Posts: 16431
  • I LOVE π = 4 * ATN(1)    Use the QB64 WIKI >>>
    • Pete's Qbasic Site
    • Email
Re: $1 Offer
« Reply #42 on: October 27, 2011, 01:55:34 PM »
MORE rules from a TOTAL STRANGER who just came here to BOSS PEOPLE AROUND! DEAD BEAT!


I agree that highlighting the variables would be an appropriate remedy! The user should decide how he wants to define the variables. Not the IDE or a persnickety person.
« Last Edit: October 27, 2011, 02:26:51 PM by Clippy »
QB64 WIKI: Main Page
Download Q-Basics Code Demo: Q-Basics.zip
Download QB64 BAT, IconAdder and VBS shortcuts: QB64BAT.zip
Download QB64 DLL files in a ZIP: Program64.zip

DeeBee

  • Sr. Member
  • ****
  • Posts: 491
    • Donnelly-House
    • Email
Re: $1 Offer
« Reply #43 on: October 27, 2011, 01:56:03 PM »
Or you could go F yourself.

Clippy

  • Hero Member
  • *****
  • Posts: 16431
  • I LOVE π = 4 * ATN(1)    Use the QB64 WIKI >>>
    • Pete's Qbasic Site
    • Email
Re: $1 Offer
« Reply #44 on: October 27, 2011, 02:07:15 PM »
You REALLY SHOULD take your own advice on that one...  ;D
QB64 WIKI: Main Page
Download Q-Basics Code Demo: Q-Basics.zip
Download QB64 BAT, IconAdder and VBS shortcuts: QB64BAT.zip
Download QB64 DLL files in a ZIP: Program64.zip

  • Print