Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow the user not to close parens, quotes etc. #66

Closed
adriweb opened this issue Sep 1, 2017 · 6 comments
Closed

Allow the user not to close parens, quotes etc. #66

adriweb opened this issue Sep 1, 2017 · 6 comments

Comments

@adriweb
Copy link
Contributor

adriweb commented Sep 1, 2017

Set up:
In the calculation app, a user types 2 * ( 3 + 5 then presses [EXE].

Current situation:
The calculator tells the user that there is a syntax error.

Proposed situation:
The calculator ignores the missing closing X character (in this case, X being a parenthesis) and computes what the user intended: 2*(3+5), resulting in less time wasted.
To be clearer to the user, as soon as an open-X character is typed, the OS would append the matching closing one to the current input, in a lighter color for instance.

Comments:

  • This could work for characters like parens (for expressions), quotes (for strings), brackets (both curly and square, for lists and matrices).
  • Support for nested characters would have to be done.
  • ... and support for characters being deleted, too, where the inserted matching closed one would go away as well.
  • Note: this is the way things work on some TI calculators (ignoring only on the z80/ez80, "grey draw" on the Nspire), and possibly others.

Example:
grey draw example

@Zezombye
Copy link

Zezombye commented Sep 2, 2017

Also maybe add autocompletion support for commas. For example, if I select "sum" from the toolbox, it gives me sum(|,,), and if I type '6' then ',', it should override the present comma instead of adding another.

The Casio calculators also support missing closing brackets btw.

@Ecco Ecco changed the title [Feature idea] Allow the user not to close parens, quotes etc. Allow the user not to close parens, quotes etc. Sep 4, 2017
@yeKcim
Copy link

yeKcim commented Oct 10, 2017

A pretty solution, could be colored brackets.

If there is only one brackets level, stay black. Each sublevel has its own color. If a bracket is open and not closed (or closed and not opened) it's red. Colors have to be used each time it's helpful…

A mockup (I thought "1st level stay black" after drawing)
capture du 2017-10-10 18-00-16

@matheod
Copy link

matheod commented May 24, 2018

I think it is better if student are forced to close bracket.
We already have too many student typing 1+x/2 instead of (1+x)/2 ...

If this sort of thing get ever added, I think it should be an option disabled by defaut.

But some coloring of bracket could be good (for exemple cooloring the "cursor touched" bracked couple).

@RubenNumworks
Copy link
Contributor

Related to #587

@RedGl0w
Copy link
Contributor

RedGl0w commented Jul 24, 2021

Indeed, other application of this would be useful :
When you want to have an expression at numerator, but you didn't opened any parentheses at the beginning, just pressing a closing parenthese and then division would be nice (so allowing student not to open parenthese too)

gbraad referenced this issue in gbraad/numworks-firmwares Mar 19, 2022
Removed the double V appearing sometimes
@artaxxx
Copy link
Collaborator

artaxxx commented Nov 25, 2022

Fixed in version 20

@artaxxx artaxxx closed this as completed Nov 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants