Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <SHGTOKEN.H>
This item is not part of the S60 5th Edition SDK

Enum TFormulaToken

Interface status: deprecated

TFormulaToken

Description

Tokens for parts of a formula.

In the descriptions below, the string equivalent of a token is given as for the English language spreadsheet engine resource file.

ETokStart

Indicates start of the formula string.

ETokOpLT

Less than comparison operator.

ETokOpLE

Less than or equal comparison operator.

ETokOpGT

Greater than comparison operator.

ETokOpGE

Greater than or equal comparison operator.

ETokOpNE

Not equal comparison operator.

ETokOpEQ

Equality comparison operator.

ETokOpAdd

Addition operator.

ETokOpSub

Subtraction operator.

ETokOpMul

Multiplication operator.

ETokOpDiv

Division operator.

ETokOpPower

To the power operator.

ETokOpUnaryPlus

Unary plus operator.

ETokOpUnaryMinus

Unary minus operator.

ETokOpNOT

Logical "NOT" operator.

ETokOpAND

Logical "AND" operator.

ETokOpOR

Logical "OR" operator.

ETokOpConcatenate

String concatenation operator ("&").

ETokDmOpnBkt

Open bracket.

ETokFirstDelimiter

Indicates first delimiter token.

ETokDmClsBkt

Close bracket.

ETokDmArgumentSeparator

Argument separator (comma).

ETokDmEOL

End-of-line delimiter (NULL).

ETokDmDBSTK

Database special token.

ETokDmStop

Stop punctuation character.

ETokDmCOLON

Colon character.

ETokDmAbsolute

Absolute reference character.

ETokDmTick

Backtick character.

ETokDmQuote

Quote character.

ETokDmHAT

Hat (caret) character.

ETokDmBackSlash

Backslash character.

ETokLexNoTokSaved

Internal lexer flag.

ETokCnReal

Real number operand.

ETokCnInt

Integer operand.

ETokCnInt8

8-bit integer operand.

ETokCnInt16

16-bit integer operand.

ETokCnNull

Reserved for future use.

ETokCnArray

Reserved for future use.

ETokCnName

Name operand.

ETokCnText

Text operand.

ETokCnCell

Cell reference operand.

ETokCnRange

Range reference operand.

ETokFnStatRange

Statistical function range delimiter token.

ETokFnStatLit

Statistical function literal delimiter token.

ETokFnStatEnd

Statistical function end delimiter token.

ETokFirstFn

Indicates first function token.

ETokFnErrNull

Null ("#NULL!") error.

The information in the cell refers to an intersection of ranges that do not in fact intersect.

ETokFnErrDivByZero

Division by zero ("#DIV/0!") error.

ETokFnErrValue

Bad value ("#VALUE!") error.

A formula contains the wrong kind of item, such as =3+"ghost".

ETokFnErrRef

Bad reference ("#REF!") error.

ETokFnErrName

Bad name ("#NAME?") error.

ETokFnErrNum

Bad number ("#NUM!") error.

The information in the cell involves an impossible calculation, or one whose result lies outside of the sheet's range.

ETokFnErrNa

Not available ("#N/A") error.

No information is available for the current cell.

ETokFnFALSE

FALSE returns FALSE or 0.

ETokFnIF

IF(x,then,else) where x, then and else may be cell references, values or expressions. Returns the value of then if x is non-zero (true), or the value of else if x is zero (false).

ETokFnTRUE

TRUE returns TRUE or 1.

ETokFnCELL

CELL(information,range) returns a type of information about the upper left cell in a range. The text string 'information' can have the values "ROW" , "COL", "ADDRESS" or "CONTENTS", which return the row number, column number, cell reference or the contents respectively.

ETokFnERRORTYPE

ERROR.TYPE(x) returns a number between 1 and 7, according to the type of error value (see ETokFnErrNull etc.) that exists in cell x.

ETokFnISBLANK

ISBLANK(x) returns TRUE if x contains no information, or FALSE if x contains information.

ETokFnISERR

ISERR(x) where x is a cell reference returns TRUE if the value in x is any error except #N/A, otherwise it returns FALSE.

ETokFnISERROR

ISERROR(x) where x is a cell reference returns TRUE if the value in x is any error, otherwise it returns FALSE.

ETokFnISLOGICAL

ISLOGICAL(x) returns TRUE if the information in cell x is logical, FALSE if it is not.

ETokFnISNA

ISNA(x) where x is a cell reference returns TRUE if the value in x is #N/A, or FALSE if the value in x is not #N/A.

ETokFnISNONTEXT

ISNONTEXT(x) returns TRUE if the information in x is not text, or FALSE if the information in x is text.

ETokFnISNUMBER

ISNUMBER(x) returns TRUE if x is a number or a cell containing either a number or a formula which returns a number. Otherwise it returns FALSE.

ETokFnISTEXT

ISTEXT(x) returns TRUE if the information in x is text, or FALSE if the information in x is not text.

ETokFnN

N(x) returns the number in a cell or in the top left cell of a range. If the cell does not contain a number, Sheet returns FALSE.

ETokFnTYPE

TYPE(x) returns a code according to the type of information x contains.

ETokFnADDRESS

ADDRESS(row_number,column_number) returns an absolute cell reference as a string, given the row and column numbers, e.g. =ADDRESS(5,4) returns '$D$5'.

ETokFnCOLUMN

COLUMN(x) returns the column number of a cell, or the number of the first column in a range.

ETokFnCOLUMNS

COLUMNS(range) returns the number of columns in a range.

ETokFnHLOOKUP

HLOOKUP(x,range,offset) looks along the top row of a range until it finds x. It then counts down to the cell which is offset rows below, taking the row that x is in as 1, and returns the value contained in that cell. The values in the first row of the range must be in ascending order.

ETokFnINDEX

INDEX(range,column,row) returns the contents of the cell at position (column,row) in range, where the top left cell in range is column 1, row 1.

ETokFnINDIRECT

INDIRECT(x) returns the information stored in the first cell that the cell x refers to. So, if B5 contains 'A2' and A2 contains '6', the function =INDIRECT(B5) will return 6.

ETokFnLOOKUP

LOOKUP(x, range1, range2) looks for x (either a string or a number) in range 1, then returns the value in the corresponding cell in range2. Each of the ranges should be either a single row or a single column of cells, and they must both be equal in length.

ETokFnOFFSET

OFFSET(reference,rows,columns) returns a new reference offset by rows and columns from the one you specify. Use positive numbers for rows and columns to offset right and down, and negative ones to offset left and up. If a range is specified in reference, the offset will be from the top left corner of the range.

ETokFnROW

ROW(x) returns the row number of a cell, or the number of the first row in a range.

ETokFnROWS

ROWS(range) returns the number of rows in a range.

ETokFnVLOOKUP

VLOOKUP(x,range,offset) works the same way as HLOOKUP, but counts down first, then across. The values in the first column of the range must be in ascending order.

ETokFnCHAR

CHAR(x) returns the character indicated by the character code x.

ETokFnCODE

CODE(string) returns the character code for the first character in string. E.g. =CODE("Hillcrest") returns the value 72, the character code for 'H'.

ETokFnEXACT

EXACT(string1,string2) will return TRUE if string1 is exactly the same as string2, otherwise it will return FALSE. The comparison takes account of case and accents.

ETokFnFIND

FIND(searchstring,string,start_position) returns the position in string where searchstring starts. The search begins at start_position. Make start position 1 to start searching from the first character, 2 to start at the second, and so on.

ETokFnLEFT

LEFT(string,n) returns the first n letters of string. E.g. =LEFT("discotheque",5) will return 'disco'.

ETokFnLENGTH

LEN(string) returns the number of characters, including spaces, in the string. E.g. =LEN("Hillcrest") will return the value 9.

ETokFnLOWER

LOWER(string) returns the string converted entirely to lower case. E.g. =LOWER("Clive") will return 'clive'.

ETokFnMID

MID(string,start_position,n) returns a string n characters long, taken from the start_position in string. For the start position, 0 is the first character, 1 the second and so on.

ETokFnPROPER

PROPER(string) returns the string with the first letter of each word in upper case and the rest in lower case. E.g. =PROPER("clive browning") returns 'Clive Browning'.

ETokFnREPLACE

REPLACE(string,start_position,n,newstring) removes n characters from string, starting from start_position, then inserts newstring at start_position, and returns the resulting string. E.g. =REPLACE("electorate",6,5,"ion") returns 'election'.

ETokFnREPT

REPT(string,n) returns string repeated n times. E.g. =REPT("*",50) will return a bar '*****' 50 characters long.

ETokFnRIGHT

RIGHT(string,n) returns the last n letters of a string. E.g. =RIGHT("farmhouse",5) will return 'house'.

ETokFnSTRING

STRING(x,n) returns a number x as a string to n decimal places. So, =STRING(3.1416,3) returns the string '3.142'.

ETokFnT

T(x) returns the text contained in a cell or in the top left cell of a range. If the cell does not contain text, blank text (an "empty string") is returned.

ETokFnTRIM

TRIM(string) returns the string with leading and trailing spaces removed, and reduces multiple spaces to a single space.

ETokFnUPPER

UPPER(string) returns the string converted to upper case.

ETokFnVALUE

VALUE(string) converts a string to a number. E.g. =VALUE("45.9") returns the number 45.9.

ETokFnDATE

DATE(year,month,day) returns the day number for the specified year, month and day.

ETokFnDATEVALUE

DATEVALUE(datestring) returns the appropriate number, given the date string. E.g. =DATEVALUE("31 Jul 97") returns a value of 35642.

ETokFnDAY

DAY(x) returns the day of the month (1 to 31) according to the day number x. E.g. =DAY(15476) returns 15, since day 15476 is the 15th of the month.

ETokFnHOUR

HOUR(x) returns the hour number between 0 and 23, according to the time value x. E.g. =HOUR(0.6) returns 14.

ETokFnMINUTE

MINUTE(x) returns the minute number between 0 and 59, according to the time value x. E.g. =MINUTE(0.612) returns 41.

ETokFnMONTH

MONTH(x) returns the month number between 1 and 12, according to the day value x. E.g. =MONTH(15476) returns 5, since day 15476 falls in May.

ETokFnNOW

NOW returns the value of the present time, combining both date and time numbers. E.g. 35642.5 is noon on 31/07/1997.

ETokFnSECOND

SECOND(x) returns the second number between 0 and 59, according to the time number x. E.g. =SECOND(0.612) returns 16.

ETokFnTIME

TIME(hour,minute,second) returns the time number for the specified hour, minute and second.

ETokFnTIMEVAL

TIMEVALUE(timestring) returns the appropriate number, given the timestring. E.g. =TIMEVALUE("15:52:12") returns 0.66125.

ETokFnTODAY

TODAY returns the day number of the current day.

ETokFnYEAR

YEAR(x) returns the year number (from 0 to 255) from the day number x. E.g. =YEAR(35642) returns 97, since day 35642 falls in 1997.

ETokFnABS

ABS(value) returns the absolute value of a number, i.e. regardless of whether it is positive or negative.

ETokFnACOS

ACOS(value) returns the arcCosine (inverse cosine) of a value.

ETokFnASIN

ASIN(value) returns the arcSine (inverse sine) of a value.

ETokFnATAN

ATAN(value) returns the arcTangent (inverse tangent) of a value.

ETokFnATAN2

ATAN2(x_value,y_value) returns the angle, in radians, whose tangent is y/x.

ETokFnCOS

COS(value) returns the cosine of a value.

ETokFnDEGREES

DEGREES(value) converts a value from radians into degrees.

ETokFnEXP

EXP(value) returns the value of e raised to the power of a value.

ETokFnFACT

FACT(value) returns the factorial of a value.

ETokFnINT

INT(value) rounds a value down to the nearest whole number.

ETokFnLN

LN(value) returns the natural logarithm of a value.

ETokFnLOG10

LOG10(value) returns the base-10 logarithm of a value.

ETokFnMOD

MOD(value1,value2) returns the remainder (called the modulus) when value1 is divided by value2.

ETokFnPI

PI inserts 'pi' in a cell, sum or formula.

ETokFnRADIANS

RADIANS(value) converts a value from degrees into radians.

ETokFnRAND

RAND returns a random number between zero and one. Use +RAND to insert a random number in a cell which does not change with each recalculation.

ETokFnROUND

ROUND(number,number_of_digits) to round a number to a given number of digits. Make the second number a negative to round to a digit to the left of the decimal point. E.g. -2 to round to the nearest 100.

ETokFnSIGN

SIGN(value) indicates the sign of a value. It returns 1 if the sign is positive, -1 if the sign is negative, and 0 if the value is 0.

ETokFnSIN

SIN(value) returns the sine of a number.

ETokFnSQRT

SQRT(value) returns the square root of a number.

ETokFnSUMPRODUCT

SUMPRODUCT(range1,range2) returns the sum of the products of corresponding items in two ranges. I.e., the first item in range1 is multiplied by the first item in range2, the second by the second, and so on. The result is the sum total of all these products.

ETokFnTAN

TAN(value) returns the tangent of a value.

ETokFnTRUNC

TRUNC(value) returns a number or the number stored in a cell with any fraction removed. So, =TRUNC(5.845) returns 5. TRUNC and INT only differ where the value is negative, as INT always rounds down to the lower number, where TRUNC just removes the section after the decimal point.

ETokFnCTERM

CTERM(interest,future_value,principal) returns the number of periods it will take for an investment of principal to reach future_value at a given interest rate. CTERM uses the formula: term = ln(future_value/principal)/ln(1+interest)

ETokFnDDB

DDB(cost,salvage,life,period) returns the depreciation per period, assuming that the asset loses much more of its value at the beginning of its life than at the end. DDB uses the formula: depreciation per period=(book value*2)/life where:book value at the start of each period= (total cost-total depreciation over all previous periods).

ETokFnFV

FV(interest,term,payment) returns the matured value of an investment given the interest rate, the term, and the payment per period. FV uses the formula: fv=payment*(((1+interest)term)-1)/interest where term is the number of periods.

ETokFnIRR

IRR(guess,cash_flows) calculates the Internal Rate of Return of an investment, to give the approximate interest rate earned. 'Guess' is a number you suppose to be close to the IRR.

ETokFnNPV

NPV(interest,cash_flows) calculates the Net Present Value of an investment: what it would be worth if you had it as a lump sum now rather than a future receipt. Interest is the interest rate per receipt period. NPV assumes the receipt occurs at the beginning the period. If the receipt occurs at the end of the period, use the formula: npv = first_receipt + NPV(interest,remaining_receipts)

ETokFnPMT

PMT(interest,term,principal) returns the amount to be repaid per period on a loan, given the interest rate, the number of repayment periods and the principal amount loaned. The function assumes repayment is made at the end of each period. If repayment is at the beginning of each period, use the formula =PMT(interest,term,principal)/(1+interest). PMT uses the formula: payment=principal*interest/(1-(1+interest)-term).

ETokFnPV

PV(interest,term,payment) returns the present value of an investment given the interest rate, the term, and the payment per period. PV uses the formula: present_value = payment * (1-(1+interest)-n) / interest.

ETokFnRATE

RATE(future_value,principal,periods) returns the interest rate for an investment, principal, to reach future_value over the given number of periods. RATE uses the formula: interest rate = ((future_value/principal)1/periods) - 1.

ETokFnSLN

SLN(cost,salvage,life) returns the depreciation per period for the asset's life. SLN assumes that the asset loses the same amount of its value during each period, and uses the formula: depreciation per period=(cost-salvage)/life.

ETokFnSYD

SYD(cost,salvage,life,period) returns the depreciation per period, assuming that the asset loses more of its value at the beginning of its life than at the end. SYD uses the formula: depreciation per period= (cost-salvage)*(life-period+1)/(life*(life+1)/2).

ETokFnTERM

TERM(payments,interest,future_value) returns the number of payments needed to accumulate future_value from a series of payments earning a periodic interest rate. TERM uses the formula: number of payments= ln(1+future_value*interest/payment)/ln(1+interest) where ln is the natural logarithm.

ETokFnCOMBIN

COMBIN(n1,n2) returns the number of possible unique groups containing a number, n2, of items that could be made from a given total number of items, n1.

ETokFnPERMUT

PERMUT(n1,n2) returns the number of possible permutations for a number, n2, of items selected from a given total number of items, n1. Unlike COMBIN, PERMUT treats the order of the possible groups as being important, so xy is different from yx.

ETokFnPOWER

POWER(x,y) returns the value of x raised to the power y.

ETokLastFn

Indicates last non-statistical function token.

ETokFirstFnBeginStat

Indicates first statistical function token.

ETokFnBeginAVERAGE

AVERAGE(list) returns the average of the numbers in the list. E.g. =AVERAGE(3,4,5,6) returns 4.5.

ETokFnBeginCHOOSE

CHOOSE(x,list) returns the xth item in the list, taking the first item to be number 1. The list may contain both text strings and values.

ETokFnBeginCOUNT

COUNT(list) returns the number of cells in the list which contain numerical information. Blank cells are not counted.

ETokFnBeginCOUNTA

COUNTA(list) returns the number of cells in the list which contain any information. This excludes blank cells, but includes those which contain blank text (i.e. where the cell contains a ' (apostrophe) mark).

ETokFnBeginCOUNTBLANK

COUNTBLANK(list) returns the number of blank cells in the list. This counts empty cells, or formulae which do not return any text.

ETokFnBeginMAX

MAX(list) returns the maximum value in a list. MAX takes account of + and - signs, so 2 is larger than -10.

ETokFnBeginMIN

MIN(list) returns the minimum value in a list. MIN takes account of + and - signs, so 2 is larger than -10.

ETokFnBeginPRODUCT

PRODUCT(list) calculates the product of a list of values.

ETokFnBeginSTDEVP

STDEVP(list) returns the standard deviation of the values in the list, treating them as a population.

ETokFnBeginSTDEV

STDEV(list) returns the standard deviation of the values in the list, treating them as a sample.

ETokFnBeginSUM

SUM(list) returns the sum of a list of values.

ETokFnBeginSUMSQ

SUMSQ(list) calculates the sum of the squares of a list of values. E.g. =SUMSQ(3,5) returns 34.

ETokFnBeginVARP

VARP(list) returns the population variance of a list of values, treating them as a population.

ETokFnBeginVAR

VAR(list) returns the variance of values in a list, treating them as a sample.

ETokLastFnBeginStat

Indicates the last statistical function token.

ETokLastArrayFn

Same as ETokLastFnBeginStat.


SHGTOKEN.H Global variables