Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Square brackets and curly brackets in expressions?
#11
(02-14-2023, 04:09 PM)TerryRitchie Wrote: Is this something that's being considered to be implemented in QB64PE?

Personally, I would find the use of multiple bracket types confusing in the BASIC dialect. Other languages, such as Python, use square brackets to identify constructs such as tuples which set them apart from evaluations. If I remember correctly I believe curly braces were used in Pascal (Delphi) for comment blocks. I don't believe I've ever run across a language that uses a mix of bracket types for evaluations. Again, my personal opinion, but I believe this would cause confusion.

G'day Terry,

No no no, not for QB64pe, I'm looking into this for BASIC Anywhere Machine.

I have a cognitive disability, so I'm experimenting with the addition of squiggly and square brackets in complex expressions.

My concern was introducing those in BASIC Anywhere Machine and creating an issue that makes it hard to get a small QB64pe snippet of code working in BASIC Anywhere Machine.  (i.e. problems because squiggly and square brackets already have syntactical meaning in QB64pe.)

Since the brackets don't have any predefined purpose in QB64pe, I am going ahead.  (However ways these brackets are used in other languages, I could not care less: I'm not catering at all to other languages and folk who use other languages; I'm just aiming to stay BASIC with sprinklings of things that aren't veering away too too obscenely from BASIC while fitting my needs vis-à-vis cognitive challenges.)

Test version of BAM for anybody who likes to fiddle: https://basicanywheremachine.neocities.org/Test/BAM_IDE
Reply
#12
Ah, ok, sorry for any confusion I may have introduced.
New to QB64pe? Visit the QB64 tutorial to get started.
QB64 Tutorial
Reply
#13
(02-14-2023, 04:36 PM)TerryRitchie Wrote: Ah, ok, sorry for any confusion I may have introduced.

Pff, no worries, no confusion.

I had an immediate "oh crap, folk are thinking this is for QB64pe", "where there's smoke, there's fire" jump into action mode.

Reflexes of a sloth over here, so quick-moving is not so much in my DNA.  But once in a blue moon ...
Reply




Users browsing this thread: 2 Guest(s)