Author Topic: DIM syntax from FreeBASIC  (Read 8162 times)

0 Members and 1 Guest are viewing this topic.

FellippeHeitor

  • Guest
Re: DIM syntax from FreeBASIC
« Reply #15 on: October 29, 2020, 08:29:27 pm »
I think that the change makes 'Dim' simpler to use. My only niggling concern would be, are the changes being made to make QB64 more efficient or to make QB64 more like FreeBasic? Just a thought...

Changes would be made just to type less. Don’t overthink it :-)

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: DIM syntax from FreeBASIC
« Reply #16 on: October 29, 2020, 08:45:03 pm »
I'M OUTRAGED... YOU USED THE F-WORD!

Well just because I hate FB as a hole... I mean a whole, doesn't mean some parts of it are not worth a look. This DIM format is a good example. I'm for it.

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: DIM syntax from FreeBASIC
« Reply #17 on: October 29, 2020, 09:19:19 pm »
Fillippe,

I think the change is a good one. But I'm reminded of the old question "How do you eat an elephant?" "One bite at a time."
This time, 'Dim' is changed, one bite. Eventually the elephant will be unrecognizable... But that's just me... over-thinking is what I do... lol

Pete,

If, I had been aware of your dislike of FreeBasic, I would not have used the word FreeBasic... lol (I'm not a fan of FreeBasic either...)
Logic is the beginning of wisdom.

Offline Cobalt

  • QB64 Developer
  • Forum Resident
  • Posts: 878
  • At 60 I become highly radioactive!
    • View Profile
Re: DIM syntax from FreeBASIC
« Reply #18 on: October 29, 2020, 09:45:42 pm »
Nay says I.

So I'm the only one who doesn't care for it I guess.
Granted after becoming radioactive I only have a half-life!

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: DIM syntax from FreeBASIC
« Reply #19 on: October 29, 2020, 10:17:35 pm »

Pete,

If, I had been aware of your dislike of FreeBasic, I would not have used the word FreeBasic... lol (I'm not a fan of FreeBasic either...)

I forgive you, because you included an elephant joke... which reminds me. Why do jungle ducks have flat webbed feet? To stomp out flaming jungle fires. Why do elephants have big flat feet? To stomp out flaming jungle ducks.

As if Cobalt didn't feel bad enough about this thread, already. :D

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: DIM syntax from FreeBASIC
« Reply #20 on: October 30, 2020, 12:27:33 am »
Thanks Pete! It took me over half a century to forget the 'flat webbed feet' joke! Looks like I will be taking it to my grave... *sigh*
(but the flaming ducks IS a classic! lol)
Logic is the beginning of wisdom.

Offline Unseen Machine

  • Forum Regular
  • Posts: 158
  • Make the game not the engine!
    • View Profile
Re: DIM syntax from FreeBASIC
« Reply #21 on: October 30, 2020, 03:28:38 am »
@Fellippe

It sounds fine to me but i'd much rather see type definitions that support arrays and have the broken linking to external libraries issue sorted out before you go adding features that do nothing for the languages capabilities. Also, if your thinking about adding stuff, are enumeratioun blocks possible!

Unseen

P.s. FB Sucks!

Offline luke

  • Administrator
  • Seasoned Forum Regular
  • Posts: 324
    • View Profile
Re: DIM syntax from FreeBASIC
« Reply #22 on: October 30, 2020, 03:49:05 am »
I intensely dislike the parenthesisation approach for some reason.

The DIM AS INTEGER X, Y, Z is fine. Parser-wise it should just checking if the second element is AS, then copying the code that does the list parsing.

Offline Richard Frost

  • Seasoned Forum Regular
  • Posts: 316
  • Needle nardle noo. - Peter Sellers
    • View Profile
Re: DIM syntax from FreeBASIC
« Reply #23 on: October 30, 2020, 04:10:07 am »
It'd be a nice addition, but the variable type _BITCOIN would be better.
It works better if you plug it in.

FellippeHeitor

  • Guest
Re: DIM syntax from FreeBASIC
« Reply #24 on: October 30, 2020, 05:42:08 am »
@Fellippe

It sounds fine to me but i'd much rather see type definitions that support arrays and have the broken linking to external libraries issue sorted out before you go adding features that do nothing for the languages capabilities. Also, if your thinking about adding stuff, are enumeratioun blocks possible!

Unseen

P.s. FB Sucks!

Unseen, I understand your beef. But not implementing this won't make me automatically know how to implement your long awaited features, which are beyond my abilities.

All the changes required to implement this will be done on the .bas source, while any of your wishes would require c knowledge, which I only scratch.

I take this as a vote in favor.

I take the thread as a vote in favor too.

As I mentioned in the first post, there isn't even guarantee it will make it to the code base any time soon either.

To those against, I remind you it won't ever affect you if it gets added.

Thanks to all for chiming in.

PS: Pete was my worst fear and who I'd see ever getting outraged :-D - this thread was started with mostly you in mind.
« Last Edit: October 30, 2020, 05:44:48 am by FellippeHeitor »

Offline Unseen Machine

  • Forum Regular
  • Posts: 158
  • Make the game not the engine!
    • View Profile
Re: DIM syntax from FreeBASIC
« Reply #25 on: October 30, 2020, 06:47:13 am »
Quote
Unseen, I understand your beef. But not implementing this won't make me automatically know how to implement your long awaited features, which are beyond my abilities.

Fair enough but i think you are under rating yourself mate.

With your new way would this be allowed?

TYPE aType
 X, Y, Z AS Single

Unseen
« Last Edit: October 30, 2020, 06:49:18 am by Unseen Machine »

FellippeHeitor

  • Guest
Re: DIM syntax from FreeBASIC
« Reply #26 on: October 30, 2020, 06:49:20 am »
There's a lot to consider beyond DIM/REDIM: TYPEs, SUB/FUNCTION parameters, DECLARE LIBRARY blocks, STATIC, SHARED, all scattered. Not gonna be an easy task when undertaken.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: DIM syntax from FreeBASIC
« Reply #27 on: October 30, 2020, 12:01:59 pm »
I intensely dislike the parenthesisation approach for some reason.

The DIM AS INTEGER X, Y, Z is fine. Parser-wise it should just checking if the second element is AS, then copying the code that does the list parsing.

It's also more typing.

But if you write a new FUNCTIONs? INTEGERS(a, b, c(), z... ) might be easier to add?

Oh what about UDT's?

DIM AS UDT  a, b c(), z
probably going to be difficult also.

Does OPTION _EXPLICIT check some kind of array list or lists?
« Last Edit: October 30, 2020, 12:25:57 pm by bplus »

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: DIM syntax from FreeBASIC
« Reply #28 on: October 30, 2020, 01:05:04 pm »
PS: Pete was my worst fear and who I'd see ever getting outraged :-D - this thread was started with mostly you in mind.

I figured as much. I hope my reply didn't knock you too far off your chair. The fun in being a forum admin is to see how many times you can "ask" the members these types of questions, while preventing an all out uncivil war. Kudos, you did a great job with this one. Also kudos from the old guard for keeping QB64 more of an updated version of QuickBASIC. I never felt like I had to abandon it to learn something new. You need FreeBASIC for that! Oops, now you've got me using the F-word.

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

FellippeHeitor

  • Guest
Re: DIM syntax from FreeBASIC
« Reply #29 on: October 30, 2020, 01:07:32 pm »
❤️