Opened 9 years ago

Closed 9 years ago

#2243 closed defect (notabug)

Charactors and some symbols are allowed to print in Calculator

Reported by: virtusanqa Owned by: rwh
Priority: High Milestone: Unspecified
Component: Calculate Version: 0.84.x
Severity: Major Keywords: Calculator
Cc: kushan.athukorala@… Distribution/OS: OLPC
Bug Status: Unconfirmed

Description

Description
Characters and some symbols were allowed to print in Calculator

Steps to Recreate

  1. Power on OLPC
  2. Wait for the activity ring (Desktop).
  3. Start Calculator activity.
  4. Enter some charactors & Symbols (qwertyu!%*())
  5. Check the screen.

Expected Result
Characters & Symbols should not be allowed to print

Actual Result
Characters & Symbols are allowed to print

Test Environment
OS: Sugar and GNOME (Dual boot)
Machine Type: XO 1.5
Build: OS 851
Firmware: Q3A50

Change History (2)

comment:1 Changed 9 years ago by tomeu

  • Component changed from sugar to Calculate
  • Owner changed from tomeu to rwh

Setting the right component. If you don't know which component it should have, leave the default (not sugar).

comment:2 Changed 9 years ago by garycmartin

  • Resolution set to notabug
  • Status changed from new to closed

Please provide the version of Calculate you are testing against as part of your description. I'm using the latest version 32 for my comments below.

Calculate allows the definition of variables for further calculations and sharing with other users collaboratively. I agree it is perhaps advanced for our 6 to 12 year old main audience, but I consider it a 'high celling' for some. I have been considering the possibilities of a basic mode for calculate to switch it to a very simple non-scientific calculator interface, or the possibility of a separate activity perhaps called 'sum' that provides a similar minimal, bare bones calculator interface with just addition, subtraction, multiplication and division. If you think this is particularly important to your deployment please raise a separate ticket of type "enhancement".

Out of the symbols provided in your example:

  • "qwertyu" is a valid variable name, if defined (see the Label field above the main input field, or type in qwertyu:3.142 to define it with the value of 3.142).
  • The "*", "(", and ")", characters are all valid for use in normal calculations e.g. 10/(5*3)
  • The % sign is a short cut for the modulus mod() function e.g. 11%2 is equivalent to mod(11,2).
  • The ! symbol is valid when used as part of a boolean expression e.g. True!=False
  • If you type in "qwertyu!%*()", Calculate will provide an error message "Error at 8: Parse error", indicating in red that the ! character was found in an unexpected place.

Closing this ticket for now, but please reopen and add more information if I misunderstood the case.

Note: See TracTickets for help on using tickets.