CN105700845A - Method and device for displaying digit arithmetic result in document - Google Patents

Method and device for displaying digit arithmetic result in document Download PDF

Info

Publication number
CN105700845A
CN105700845A CN201610109022.0A CN201610109022A CN105700845A CN 105700845 A CN105700845 A CN 105700845A CN 201610109022 A CN201610109022 A CN 201610109022A CN 105700845 A CN105700845 A CN 105700845A
Authority
CN
China
Prior art keywords
document
user
arithmetic expression
character
input
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610109022.0A
Other languages
Chinese (zh)
Inventor
蔡克虎
苏磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201610109022.0A priority Critical patent/CN105700845A/en
Publication of CN105700845A publication Critical patent/CN105700845A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The embodiment of the invention discloses a method for displaying a digit arithmetic result in a document. By means of method, the operating process of calculating the result of an arithmetic expression in the document can be simplified, and computing resources can be saved. The method includes the steps that whether content input into the document by a user currently is an arithmetic expression or not is determined; if the content input by the user is an arithmetic expression, the arithmetic result of the arithmetic expression is acquired; the arithmetic result is displayed in the document. The embodiment of the invention further discloses a device for displaying the digit arithmetic result in the document.

Description

A kind of method of operation result of display digit in a document and device
Technical field
The present invention relates to the document processing technology of computer realm, particularly relate to method and the device of a kind of operation result of display digit in a document。
Background technology
Along with the development that office is with no paper, writing of a lot of word contributions is all undertaken by computer, for instance, adopt word to write speech draft or article etc.。
In the process writing word document, it is possible to there will be the operations such as the addition subtraction multiplication and division remainder of editor's numeral, and need to obtain in time the result of numerical calculation。In prior art, it usually needs first user is input in computer numeral, by computer result of calculation, then result is filled up to the relevant position of world document again。Such as, when user inputs arithmetic expression " 102+111252+4982+582=" in world document, user needs first this arithmetic expression to be input to computer, and computer obtains the result of this arithmetic expression through calculating, and this result is filled up in world document the rear of arithmetic expression equal sign by user again。
But the method complex operation of prior art, if the computing in the word document that user writes is more, it is necessary to user frequently switches between word document and computer, occupy more computer resource, and easily caused by computer corruption, cause that user loses significant data。
Summary of the invention
For solving above-mentioned technical problem, embodiment of the present invention expectation provides method and the device of a kind of operation result of display digit in a document, it is possible to simplifies and calculates the operating process of arithmetic expression result in document, saves and calculate resource。
The technical scheme is that and be achieved in that:
On the one hand, the embodiment of the present invention provides a kind of method of operation result of display digit in a document, including:
Determine whether the content that user currently inputs in a document is arithmetic expression;
If the content of user's input is arithmetic expression, obtain the operation result of described arithmetic expression;
Show described operation result within said document。
Optionally, whether the content that the described user of determination currently inputs in a document is that arithmetic expression includes:
Obtaining the n-th character of user's input, described N is the integer more than or equal to 1;
Determine whether described n-th character is numeral;
When described n-th character is numeral, it is determined that whether the N+1 character of user's input is operator;
When the N+1 character of user's input is operator, it is determined that whether the N+2 character of user's input is numeral;
When the N+2 character of user's input is numeral, it is determined that the content that described user currently inputs in a document is arithmetic expression。
Optionally, described show that described operation result includes within said document:
Adopt the mode of the display that suspends, show described operation result within said document。
Optionally, described arithmetic expression is positioned at the M row of described document;
The described mode adopting the display that suspends, shows that described operation result includes within said document:
Adopt the mode of the display that suspends, position corresponding with described arithmetic expression in the M-1 row or M+1 row of described document, show described operation result。
Optionally, described arithmetic expression is positioned at the M row of described document;
The described mode adopting the display that suspends, shows that described operation result includes within said document:
Obtain the initial position of described arithmetic expression;
Adopt the mode of the display that suspends, position corresponding with described initial position in the M+1 row or M+1 row of described document, show that described operation result continues preset duration。
On the other hand, the embodiment of the present invention provides the device of a kind of operation result of display digit in a document, including:
Determine unit, for determining whether the content that user currently inputs in a document is arithmetic expression;
Acquiring unit, if the content for user's input is arithmetic expression, obtains the operation result of described arithmetic expression;
Display unit, for showing described operation result within said document。
Optionally, described determine unit specifically for:
Obtaining the n-th character of user's input, described N is the integer more than or equal to 1;
Determine whether described n-th character is numeral;
When described n-th character is numeral, it is determined that whether the N+1 character of user's input is operator;
When the N+1 character of user's input is operator, it is determined that whether the N+2 character of user's input is numeral;
When the N+2 character of user's input is numeral, it is determined that the content that described user currently inputs in a document is arithmetic expression。
Optionally, described display unit specifically for:
Adopt the mode of the display that suspends, show described operation result within said document。
Optionally, described arithmetic expression is positioned at the M row of described document;
Described display unit specifically for:
Adopt the mode of the display that suspends, position corresponding with described arithmetic expression in the M-1 row or M+1 row of described document, show described operation result。
Optionally, described arithmetic expression is positioned at the M row of described document;
Described display unit specifically for:
Obtain the initial position of described arithmetic expression;
Adopt the mode of the display that suspends, position corresponding with described initial position in the M+1 row or M+1 row of described document, show that described operation result continues preset duration。
Embodiments providing method and the device of a kind of operation result of display digit in a document, the method for the described operation result of display digit in a document comprises determining that whether the content that user currently inputs in a document is arithmetic expression;If the content of user's input is arithmetic expression, obtain the operation result of described arithmetic expression;Show described operation result within said document。Compared to prior art, when determining that user inputs arithmetic expression, it is possible to directly obtain the result of calculation of this arithmetic expression, and show in the document, it is easy to user and inputs the result of this arithmetic expression in a document, simplify and calculate the operating process of arithmetic expression result in document, saved calculating resource。
Accompanying drawing explanation
Fig. 1 is the hardware architecture diagram realizing each one optional mobile terminal of embodiment of the present invention;
The schematic flow sheet 1 of the method for a kind of operation result of display digit in a document that Fig. 2 provides for the embodiment of the present invention;
The schematic flow sheet 2 of the method for a kind of operation result of display digit in a document that Fig. 3 provides for the embodiment of the present invention;
The structural representation of the device of a kind of operation result of display digit in a document that Fig. 4 provides for the embodiment of the present invention。
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described。
The mobile terminal realizing each embodiment of the present invention is described referring now to accompanying drawing。In follow-up description, use the suffix being used for representing such as " module ", " parts " or " unit " of element only for being conducive to the explanation of the present invention, itself do not have specific meaning。Therefore, " module " and " parts " can mixedly use。
Mobile terminal can be implemented in a variety of manners。Such as, the terminal described in the present invention can include the mobile terminal of such as mobile phone, smart phone, notebook computer, digit broadcasting receiver, personal digital assistant (PDA), panel computer (PAD), portable media player (PMP), guider etc. and the fixed terminal of such as numeral TV, desk computer etc.。Hereinafter it is assumed that terminal is mobile terminal。However, it will be understood by those skilled in the art that, except being used in particular for the element of mobile purpose, structure according to the embodiment of the present invention can also apply to the terminal of fixed type。
Fig. 1 is the hardware configuration signal of the mobile terminal realizing each embodiment of the present invention。
Mobile terminal 100 can include user input unit 130, output unit 150, memorizer 160, controller 180 and power subsystem 190 etc.。Fig. 1 illustrates the mobile terminal with various assembly, it should be understood that be not required for implementing all assemblies illustrated。Can alternatively implement more or less of assembly。Will be discussed in more detail below the element of mobile terminal。
User input unit 130 can generate key input data to control the various operations of mobile terminal according to the order of user's input。User input unit 130 allows user to input various types of information, and can include keyboard, metal dome, touch pad (such as, detection due to touched and cause resistance, pressure, electric capacity etc. the sensitive component of change), roller, rocking bar etc.。Especially, when touch pad is superimposed upon on display unit 151 as a layer, it is possible to form touch screen。
Output unit 150 can include display unit 151。Display unit 151 may be displayed on the information processed in mobile terminal 100。Such as, when mobile terminal 100 is in telephone calling model, display unit 151 can show the user interface (UI) relevant with call or other communicate (such as, text messaging, multimedia file download etc.) or graphic user interface (GUI)。When being in video calling pattern or image capture mode when mobile terminal 100, display unit 151 can show the image of image and/or the reception caught, UI or GUI illustrating video or image and correlation function etc.。
Meanwhile, when display unit 151 and touch pad as a layer superposed on one another to form touch screen time, display unit 151 can serve as input equipment and output device。Display unit 151 can include at least one in liquid crystal display (LCD), thin film transistor (TFT) LCD (TFT-LCD), Organic Light Emitting Diode (OLED) display, flexible display, three-dimensional (3D) display etc.。Some in these display may be constructed such that transparence is to allow user to watch from outside, and this is properly termed as transparent display, and typical transparent display can be such as TOLED (transparent organic light emitting diode) display etc.。According to the specific embodiment wanted, mobile terminal 100 can include two or more display units (or other display device), such as, mobile terminal can include outernal display unit (not shown) and inner display unit (not shown)。Touch screen can be used for detecting touch input pressure and touch input position and touch input area。
Memorizer 160 can store the process performed by controller 180 and control software program etc. of operation, or can temporarily store and export the data (such as, telephone directory, message, still image, video etc.) that maybe will export。And, memorizer 160 can store the vibration about the various modes exported when touching and being applied to touch screen and the data of audio signal。
Memorizer 160 can include the storage medium of at least one type, described storage medium includes flash memory, hard disk, multimedia card, card-type memorizer (such as, SD or DX memorizer etc.), random access storage device (RAM), static random-access memory (SRAM), read only memory (ROM), Electrically Erasable Read Only Memory (EEPROM), programmable read only memory (PROM), magnetic storage, disk, CD etc.。And, mobile terminal 100 can be connected the network storage device cooperation of the storage function performing memorizer 160 with by network。
Controller 180 generally controls the overall operation of mobile terminal。Such as, controller 180 performs the control relevant to voice call, data communication, video calling etc. and process。Controller 180 can perform pattern recognition process, so that the handwriting input performed on the touchscreen or picture drafting input are identified as character or image。
Power subsystem 190 receives external power or internal power under the control of controller 180 and provides the suitable electric power operated needed for each element and assembly。
Various embodiment described herein can to use such as computer software, hardware or its any combination of computer-readable medium to implement。Hardware is implemented, embodiment described herein can pass through to use application-specific IC (ASIC), digital signal processor (DSP), digital signal processing device (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), processor, controller, microcontroller, microprocessor, at least one that is designed to perform in the electronic unit of function described herein to implement, in some cases, such embodiment can be implemented in controller 180。Implementing for software, the embodiment of such as process or function can be implemented with allowing the independent software module performing at least one function or operation。Software code can be implemented by the software application (or program) write with any suitable programming language, and software code can be stored in memorizer 160 and be performed by controller 180。
So far, mobile terminal is described according to its function。Below, for the sake of brevity, by the slide type mobile terminal in the various types of mobile terminals describing such as folded form, board-type, oscillating-type, slide type mobile terminal etc. exemplarily。Therefore, the present invention can be applied to any kind of mobile terminal, and is not limited to slide type mobile terminal。
Mobile terminal 100 as shown in Figure 1 may be constructed such that utilization operates via such as wired and wireless communication system and the satellite-based communication system of frame or packet transmission data。
Embodiment one
The embodiment of the present invention provides a kind of method of operation result of display digit in a document, it is possible to be applied to computer, panel computer, mobile phone, and other have the device of documents editing function, as in figure 2 it is shown, described method includes:
Step 201, determine whether the content that user currently inputs in a document is arithmetic expression。
Example, described arithmetic expression is at least made up of two numerals and the operator between these two numerals。When user's input content in a document, it is possible to whether the character of detection user input is numeral in real time, it is assumed that user is currently entered n-th character, when the n-th character of user's input is numeral, it is determined that whether the N+1 character of user's input is operator;When the N+1 character of user's input is operator, it is determined that whether the N+2 character of user's input is numeral;When the N+2 character of user's input is numeral, it is determined that the content that described user currently inputs in a document is include two digital arithmetic expressions。User is also possible to the arithmetic expression that input is more complicated, therefore when the N+2 the character determining that user inputs is numeral, can also continue to determine whether the N+3 character that user inputs is operator, if the N+3 character of user's input is operator, whether the N+4 the character obtaining user's input is numeral, when the N+4 character of user's input is numeral, illustrates that user have input and include three digital arithmetic expressions。By that analogy, it is possible to the persistently type of the character of detection user input, until determining that the N+i character that user inputs is numeral, and when the N+i+1 character of user's input is not operator, illustrate that user have input the arithmetic expression including i numeral。Wherein, described N and i is the integer more than or equal to 1。
Such as, user currently inputs the 5th character in a document, i.e. N=5, determine the 5th character for numeral 25, then obtain user input the 6th character, it is determined that go out described 6th character be operator "+", then the 7th character of user's input is obtained, determine that described 7th character is for numeral 62, at this point it is possible to determine that user have input arithmetic expression " 25+62 "。Owing to user is also possible to the arithmetic expression that input is more complicated, therefore after determining that the 7th character is for numeral 62, can also continue to obtain the 8th character of user's input, determine whether described 8th character is operator, if described 8th character is operator, then obtain the 9th character of user's input, it is determined that whether the 9th character of user's input is numeral, if described 9th character is numeral, illustrates that user have input and include three digital arithmetic expressions。Similar, it is possible to the persistently type of the character of detection user input, until determining that the 5+i character that user inputs is numeral, and when the 5+i+1 character of user's input is not operator, illustrate that user have input the arithmetic expression including i numeral。
If the content of step 202 user input is arithmetic expression, obtain the operation result of described arithmetic expression。
Example, if the content of user's input is arithmetic expression, illustrate that user may wish to obtain the result of calculation of this arithmetic expression。In prior art, it is necessary to user is switched to computer, being input in computer by arithmetic expression, computer calculates the result of this arithmetic expression, and then calculated for computer result is filled in document by user, and operating process is complex。In the embodiment of the present invention when the content determining that user inputs is arithmetic expression, the computing module of document can be called, calculate the operation result of described arithmetic expression, described computing module is the instrument with computing capability being preset in the document, concrete method to set up is prior art, and the embodiment of the present invention does not repeat at this。
Concrete, if arithmetic expression be " 25+62+47+81 ", computing module can calculate the sums of 4 numeral additions successively according to order from left to right, described and be the operation result of arithmetic expression。In practical application, it is also possible that some special circumstances, such as, if arithmetic expression is " (5+6) * 6+ (8+8) ", computing module can not calculate successively, but need the result first calculating in bracket, then it is sequentially carried out calculating according to order from left to right, obtains the result of arithmetic expression;If there is negative in arithmetic expression, it is possible to described negative is processed as the arithmetic expression in a bracket。Concrete computational methods are identical with mathematic calculation in prior art, and the embodiment of the present invention does not repeat at this。
Step 203, show described operation result within said document。
Example, after the result of calculation getting arithmetic expression, it is possible to various ways shows described operation result in a document。Optionally, the toolbar section of described document can arrange display box, after getting the result of calculation of arithmetic expression, it is possible to shows described result of calculation in this display box;Or to mark bright form, it is shown in the left and right side frame part of document current page;Or the position being shown on document cursor place。
It is also preferred that the left the mode of the display that suspends can be adopted, show described operation result within said document。Such as, after getting result of calculation, it is possible to show this result of calculation in the position at cursor place on document with the form of suspended window;Or in left and right side frame part, this result of calculation can also be shown with the form of suspended window。Concrete, it is assumed that described arithmetic expression is positioned at the M row of described document, it is possible to adopts the mode of the display that suspends, position corresponding with described arithmetic expression in the M-1 row or M+1 row of described document, shows described operation result。Or after the result of calculation getting arithmetic expression, it is possible to first obtain the initial position of described arithmetic expression, then adopt the mode of suspended window, position corresponding with described initial position in the M+1 row or M+1 row of described document, show described operation result。
Example, if after getting result of calculation, show in viewing area that this result of calculation can affect writing of user on the contrary always, also display resource is taken, when therefore initializing, preset duration can be set, after getting result of calculation, it is possible to show that this result of calculation continues preset duration in corresponding viewing area, when growing more than or equal to preset duration when displayed, described result of calculation disappears。Such as, assume that described preset duration is 5 seconds, described M is 7, after the result of calculation getting arithmetic expression, first the initial position is the 7th row the 10th character of the arithmetic expression being positioned at the 7th row is obtained, then the mode of suspended window is adopted, the 10th position that character is corresponding in the 6th row or eighth row of described document, show described operation result 5 seconds。In practical application, it is also possible to preset duration described in subsection setup, for instance, if the numerical digit of result of calculation is within 4, described preset duration is 3 seconds;If the numerical digit of result of calculation is more than 4, described preset duration is 5 seconds, it is simple to user record complexity result。
The embodiment of the present invention provides a kind of method of operation result of display digit in a document, and the method for the described operation result of display digit in a document comprises determining that whether the content that user currently inputs in a document is arithmetic expression;If the content of user's input is arithmetic expression, obtain the operation result of described arithmetic expression;Show described operation result within said document。Compared to prior art, when determining that user inputs arithmetic expression, it is possible to directly obtain the result of calculation of this arithmetic expression, and show in the document, it is easy to user and inputs the result of this arithmetic expression in a document, simplify and calculate the operating process of arithmetic expression result in document, saved calculating resource。
Embodiment two
The embodiment of the present invention provides a kind of method of operation result of display digit in a document, it is applied to computer, panel computer, mobile phone, and in the communication software of copy editor's class, the embodiment of the present invention illustrates for computer, described document can be word, notepad, memorandum etc., this is not limited by the embodiment of the present invention。As it is shown on figure 3, the method for the described operation result of display digit in a document includes:
The n-th character that step 301, acquisition user are currently entered, performs step 302。
Example, when user writes document, it is possible to the character that user in real is currently entered, and concrete acquisition methods is prior art, and the embodiment of the present invention does not repeat at this。
Step 302, determine that whether described n-th character is numeral, if described n-th character be numeral, execution step 303;If described n-th character is not numeral, perform step 311。
Example, after getting the n-th character that user is currently entered, it may be determined that whether n-th character is numeral, when n-th character is numeral, illustrates that user is likely to input arithmetic expression, it is necessary to continue the type of detection character late;When n-th character is not numeral, illustrate that user does not currently input arithmetic expression, any process that it goes without doing, continues the type of the character late of detection user's input。
The N+1 character that step 303, acquisition user input, performs step 304;
Step 304, determine whether described the N+1 character is operator, if described the N+1 character is operator, perform step 305;If described the N+1 character is not operator, perform step 311。
Example, when n-th character is numeral, it is necessary to continuing to determine whether the N+1 character is operator, if the N+1 character is operator, then user is currently likely to input arithmetic expression;If the N+1 character is not operator, illustrate that user does not currently input arithmetic expression, any process that it goes without doing, continues the type of the character late of detection user's input。
The N+2 character that step 305, acquisition user input, performs step 306;
Step 306, determine that whether described the N+2 character be numeral, if described the N+2 character be digital, execution step 307;If described the N+2 character is not numeral, perform step 311。
Example, when the N+1 character is operator, it is necessary to continues to determine whether the N+2 character is numeral, if the N+2 character is numeral, illustrates that the content that user is currently entered is arithmetic expression;If the N+2 character is not numeral, illustrate that user does not currently input arithmetic expression, any process that it goes without doing, continues the type of the character late of detection user's input。
The type of step 307, the persistently character of detection user input, performs step 308。
Example, the arithmetic expression of user's input is likely to complex, therefore can after determining that the N+2 character be numeral, can continue to detect the type of the character of user's input, until determining that the N+i character that user inputs is numeral, and the N+i+1 character of user's input is when being not operator, illustrates arithmetic expression to have been inputted, this arithmetic expression include i digital。Wherein, described N and i is the integer more than or equal to 1。
Step 308, when the N+i character of user's input be numeral, and when the N+i+1 character is not operator, the operation result of the arithmetic expression that acquisition user inputs, execution step 309。
Example, it is possible to the computing module calling document calculates the result of described arithmetic expression, and computation rule is identical with mathematical calculation rule in prior art, and the embodiment of the present invention does not repeat at this。Concrete, if arithmetic expression be " 25+62+47+81 ", computing module can calculate the sums of 4 numeral additions successively according to order from left to right, described and be the operation result of arithmetic expression。In practical application, it is also possible that some special circumstances, such as, if arithmetic expression is " (5+6) * 6+ (8+8) ", computing module can not calculate successively, but need the result first calculating in bracket, then it is sequentially carried out calculating according to order from left to right, obtains the result of arithmetic expression;If there is negative in arithmetic expression, it is possible to described negative is processed as the arithmetic expression in a bracket。
Step 309, obtain the line number M of described arithmetic expression position, perform step 310。
Example, user is when writing document, and the line number of the every one page of document determines that, the line space of arbitrary neighborhood two row is also identical, therefore the line number M of the arithmetic expression position of input, described M can be got more than or equal to 1, less than or equal to the maximum number of lines of document each page。For example, it is assumed that every one page maximum number of lines is 25 in document, then M is more than or equal to 1, less than or equal to 25。Concrete acquisition mode is prior art, and the embodiment of the present invention does not repeat at this。
Step 310, adopting the mode of the display that suspends, in the position that the M+1 row of described document or M-1 row are corresponding with described arithmetic expression, show described result of calculation persistently preset duration, this flow process terminates。
Example, assume that described preset duration is 5 seconds, described M is 7, after the result of calculation getting arithmetic expression, can first obtain the initial position of the arithmetic expression being positioned at the 7th row, it is assumed that this initial position is the 10th character of the 7th row, then adopts the mode of suspended window, the 10th position that character is corresponding in the 6th row or eighth row of described document, shows described operation result 5 seconds。In practical application, it is also possible to preset duration described in subsection setup, for instance, if the numerical digit of result of calculation is within 4, described preset duration is 3 seconds;If the numerical digit of result of calculation is more than 4, described preset duration is 5 seconds, it is simple to user record complexity result。
The character types that step 311, continuation detection user input。
The embodiment of the present invention provides a kind of method of operation result of display digit in a document, compared to prior art, when determining that user inputs arithmetic expression, can directly obtain the result of calculation of this arithmetic expression, and show in the document, it is easy to user and inputs the result of this arithmetic expression in a document, simplify and calculate the operating process of arithmetic expression result in document, saved calculating resource。
Embodiment three
The embodiment of the present invention provides the device 40 of a kind of operation result of display digit in a document, as shown in Figure 4, and including:
Determine unit 401, for determining whether the content that user currently inputs in a document is arithmetic expression。
Acquiring unit 402, if the content for user's input is arithmetic expression, obtains the operation result of described arithmetic expression。
Display unit 403, for showing described operation result within said document。
So, when determining that user inputs arithmetic expression, it is possible to directly obtain the result of calculation of this arithmetic expression, and show in the document, it is easy to user and inputs the result of this arithmetic expression in a document, simplify and calculate the operating process of arithmetic expression result in document, saved calculating resource。
Optionally, described determine unit 401 specifically for: obtain user input n-th character, described N is the integer more than or equal to 1;Determine whether described n-th character is numeral;When described n-th character is numeral, it is determined that whether the N+1 character of user's input is operator;When the N+1 character of user's input is operator, it is determined that whether the N+2 character of user's input is numeral;When the N+2 character of user's input is numeral, it is determined that the content that described user currently inputs in a document is arithmetic expression。
Optionally, described display unit 403 specifically for: adopt suspend display mode, show described operation result within said document。
Optionally, described arithmetic expression is positioned at the M row of described document;Described display unit 403 specifically for: adopt suspend display mode, position corresponding with described arithmetic expression in the M-1 row or M+1 row of described document, show described operation result。
Optionally, described arithmetic expression is positioned at the M row of described document;Described display unit 403 specifically for: obtain the initial position of described arithmetic expression;Adopt the mode of the display that suspends, position corresponding with described initial position in the M+1 row or M+1 row of described document, show that described operation result continues preset duration。
It should be noted that first, those skilled in the art is it can be understood that arrive, for convenience and simplicity of description, and the device of foregoing description and the specific works process of unit, it is possible to reference to the corresponding process in preceding method embodiment, do not repeat them here。
Second, described determine that unit 401 and described acquiring unit 402 all can by the central processing unit (CentralProcessingUnit of the device 40 being arranged in display digit operation result in a document, CPU), microprocessor (MicroProcessorUnit, MPU), digital signal processor (DigitalSignalProcessor, DSP) or field programmable gate array (FieldProgrammableGateArray, FPGA) etc. realize。Described display unit 403 can be realized by the drive circuit of the display screen and display screen that are arranged in device 40。
The embodiment of the present invention provides the device of a kind of operation result of display digit in a document, comprises determining that unit, for determining whether the content that user currently inputs in a document is arithmetic expression。Acquiring unit, if the content for user's input is arithmetic expression, obtains the operation result of described arithmetic expression。Display unit, for showing described operation result within said document。Compared to prior art, when determining that user inputs arithmetic expression, it is possible to directly obtain the result of calculation of this arithmetic expression, and show in the document, it is easy to user and inputs the result of this arithmetic expression in a document, simplify and calculate the operating process of arithmetic expression result in document, saved calculating resource。
Those skilled in the art are it should be appreciated that embodiments of the invention can be provided as method, system or computer program。Therefore, the present invention can adopt the form of hardware embodiment, software implementation or the embodiment in conjunction with software and hardware aspect。And, the present invention can adopt the form at one or more upper computer programs implemented of computer-usable storage medium (including but not limited to disk memory and optical memory etc.) wherein including computer usable program code。
The present invention is that flow chart and/or block diagram with reference to method according to embodiments of the present invention, equipment (system) and computer program describe。It should be understood that can by the combination of the flow process in each flow process in computer program instructions flowchart and/or block diagram and/or square frame and flow chart and/or block diagram and/or square frame。These computer program instructions can be provided to produce a machine to the processor of general purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device so that the instruction performed by the processor of computer or other programmable data processing device is produced for realizing the device of function specified in one flow process of flow chart or multiple flow process and/or one square frame of block diagram or multiple square frame。
These computer program instructions may be alternatively stored in and can guide in the computer-readable memory that computer or other programmable data processing device work in a specific way, the instruction making to be stored in this computer-readable memory produces to include the manufacture of command device, and this command device realizes the function specified in one flow process of flow chart or multiple flow process and/or one square frame of block diagram or multiple square frame。
These computer program instructions also can be loaded in computer or other programmable data processing device, make on computer or other programmable devices, to perform sequence of operations step to produce computer implemented process, thus the instruction performed on computer or other programmable devices provides for realizing the step of function specified in one flow process of flow chart or multiple flow process and/or one square frame of block diagram or multiple square frame。
The above, be only presently preferred embodiments of the present invention, is not intended to limit protection scope of the present invention。

Claims (10)

1. the method for a display digit operation result in a document, it is characterised in that including:
Determine whether the content that user currently inputs in a document is arithmetic expression;
If the content of user's input is arithmetic expression, obtain the operation result of described arithmetic expression;
Show described operation result within said document。
2. method according to claim 1, it is characterised in that whether the content that the described user of determination currently inputs in a document is that arithmetic expression includes:
Obtaining the n-th character of user's input, described N is the integer more than or equal to 1;
Determine whether described n-th character is numeral;
When described n-th character is numeral, it is determined that whether the N+1 character of user's input is operator;
When the N+1 character of user's input is operator, it is determined that whether the N+2 character of user's input is numeral;
When the N+2 character of user's input is numeral, it is determined that the content that described user currently inputs in a document is arithmetic expression。
3. method according to claim 1 and 2, it is characterised in that described show that described operation result includes within said document:
Adopt the mode of the display that suspends, show described operation result within said document。
4. method according to claim 3, it is characterised in that described arithmetic expression is positioned at the M row of described document;
The described mode adopting the display that suspends, shows that described operation result includes within said document:
Adopt the mode of the display that suspends, position corresponding with described arithmetic expression in the M-1 row or M+1 row of described document, show described operation result。
5. method according to claim 3, it is characterised in that described arithmetic expression is positioned at the M row of described document;
The described mode adopting the display that suspends, shows that described operation result includes within said document:
Obtain the initial position of described arithmetic expression;
Adopt the mode of the display that suspends, position corresponding with described initial position in the M+1 row or M+1 row of described document, show that described operation result continues preset duration。
6. the device of a display digit operation result in a document, it is characterised in that including:
Determine unit, for determining whether the content that user currently inputs in a document is arithmetic expression;
Acquiring unit, if the content for user's input is arithmetic expression, obtains the operation result of described arithmetic expression;
Display unit, for showing described operation result within said document。
7. device according to claim 6, it is characterised in that described determine unit specifically for:
Obtaining the n-th character of user's input, described N is the integer more than or equal to 1;
Determine whether described n-th character is numeral;
When described n-th character is numeral, it is determined that whether the N+1 character of user's input is operator;
When the N+1 character of user's input is operator, it is determined that whether the N+2 character of user's input is numeral;
When the N+2 character of user's input is numeral, it is determined that the content that described user currently inputs in a document is arithmetic expression。
8. the device according to claim 6 or 7, it is characterised in that described display unit specifically for:
Adopt the mode of the display that suspends, show described operation result within said document。
9. device according to claim 8, it is characterised in that described arithmetic expression is positioned at the M row of described document;
Described display unit specifically for:
Adopt the mode of the display that suspends, position corresponding with described arithmetic expression in the M-1 row or M+1 row of described document, show described operation result。
10. device according to claim 3, it is characterised in that described arithmetic expression is positioned at the M row of described document;
Described display unit specifically for:
Obtain the initial position of described arithmetic expression;
Adopt the mode of the display that suspends, position corresponding with described initial position in the M+1 row or M+1 row of described document, show that described operation result continues preset duration。
CN201610109022.0A 2016-02-26 2016-02-26 Method and device for displaying digit arithmetic result in document Pending CN105700845A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610109022.0A CN105700845A (en) 2016-02-26 2016-02-26 Method and device for displaying digit arithmetic result in document

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610109022.0A CN105700845A (en) 2016-02-26 2016-02-26 Method and device for displaying digit arithmetic result in document

Publications (1)

Publication Number Publication Date
CN105700845A true CN105700845A (en) 2016-06-22

Family

ID=56222476

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610109022.0A Pending CN105700845A (en) 2016-02-26 2016-02-26 Method and device for displaying digit arithmetic result in document

Country Status (1)

Country Link
CN (1) CN105700845A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106775580A (en) * 2016-11-28 2017-05-31 珠海市魅族科技有限公司 A kind of text input control method, mobile terminal and hand-held mobile terminal
CN107705195A (en) * 2017-09-29 2018-02-16 努比亚技术有限公司 A kind of computational methods of bill, terminal and readable storage medium storing program for executing
CN109033048A (en) * 2018-06-29 2018-12-18 维沃移动通信有限公司 A kind of information processing method and mobile terminal
CN111708473A (en) * 2020-05-25 2020-09-25 维沃移动通信有限公司 Operation control method and device of application program and electronic equipment
CN114063847A (en) * 2021-11-18 2022-02-18 得力集团有限公司 Calculator prompt language display control method and calculator

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104536817A (en) * 2014-12-24 2015-04-22 小米科技有限责任公司 Computing method and device
US9086839B2 (en) * 2010-12-15 2015-07-21 Userful Corporation Multiple user computing method and system for same
CN105049607A (en) * 2015-06-24 2015-11-11 广东欧珀移动通信有限公司 Text message display method and mobile terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9086839B2 (en) * 2010-12-15 2015-07-21 Userful Corporation Multiple user computing method and system for same
CN104536817A (en) * 2014-12-24 2015-04-22 小米科技有限责任公司 Computing method and device
CN105049607A (en) * 2015-06-24 2015-11-11 广东欧珀移动通信有限公司 Text message display method and mobile terminal

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106775580A (en) * 2016-11-28 2017-05-31 珠海市魅族科技有限公司 A kind of text input control method, mobile terminal and hand-held mobile terminal
CN107705195A (en) * 2017-09-29 2018-02-16 努比亚技术有限公司 A kind of computational methods of bill, terminal and readable storage medium storing program for executing
CN109033048A (en) * 2018-06-29 2018-12-18 维沃移动通信有限公司 A kind of information processing method and mobile terminal
CN111708473A (en) * 2020-05-25 2020-09-25 维沃移动通信有限公司 Operation control method and device of application program and electronic equipment
CN111708473B (en) * 2020-05-25 2022-02-18 维沃移动通信有限公司 Operation control method and device of application program and electronic equipment
CN114063847A (en) * 2021-11-18 2022-02-18 得力集团有限公司 Calculator prompt language display control method and calculator

Similar Documents

Publication Publication Date Title
US11210458B2 (en) Device, method, and graphical user interface for editing screenshot images
JP4284286B2 (en) Method and apparatus enabling application program compatibility with display devices having improved pixel density
CN105700845A (en) Method and device for displaying digit arithmetic result in document
CN105373326B (en) Data processing system and method
CA2959247A1 (en) Context-aware field value suggestions
KR20100013539A (en) User interface apparatus and method for using pattern recognition in handy terminal
KR20140046346A (en) Multi display apparatus and method for contorlling thereof
CN104063063A (en) Mathematical calculation input method of input method and input method system
US20140101553A1 (en) Media insertion interface
US9652141B2 (en) Portable electronic device including touch-sensitive display and method of controlling same
US10782800B2 (en) Dynamic interaction adaptation of a digital inking device
CN103970451A (en) Method and apparatus for controlling content playback
US20160062601A1 (en) Electronic device with touch screen and method for moving application functional interface
JP2012053867A (en) Handwritten data output processor
CN104956378A (en) Electronic apparatus and handwritten-document processing method
CN106557175A (en) Character input method and electronic equipment
CN111796897A (en) Page display method and device, storage medium and electronic equipment
CN106445291A (en) Method and terminal for achieving application processing
CN105867629A (en) Method and device for rapidly recording calculation results and intelligent terminal
US20180300029A1 (en) Smart Bookmarks For Viewing Content
TW201734709A (en) Electronic device and switch method and system for inputting
US20150029114A1 (en) Electronic device and human-computer interaction method for same
CN105808067A (en) Icon moving method and terminal
CN103620530A (en) Information input method and touch screen terminal
CN105867763A (en) Information processing method and terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20160622

RJ01 Rejection of invention patent application after publication