/[public]/psiconv/trunk/formats/psion/Sheet_Formula_List.psi
ViewVC logotype

Contents of /psiconv/trunk/formats/psion/Sheet_Formula_List.psi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 114 - (show annotations)
Sun Mar 11 19:58:18 2001 UTC (19 years, 4 months ago) by frodo
File MIME type: application/octet-stream
File size: 8325 byte(s)
(Frodo) Last updates for 2.7

1 7mþŸUT ²”
2 dÈ"Times New RomanN123O*Koptekst 1L ð
3 < *Koptekst 2Lð ð
4 < *Koptekst 3L *OpsomtekenO³•Swissÿÿÿÿh3r h3r ÐР \cefd\cDefLdý‚.ÆA X[Sheet Formula List]Sheet Formula ListAll used formulas are put into this section, and referenced when used. Data Description B Always 02 ? «XListE» List of «Sheet Formulas»When referenced, the formula number is counted from the tail of the list: the last entry is referenced as 00, the butlast as 02 etc. (X-numbered?).[Sheet Formula][Sheet Formulas]Sheet FormulaA formula is encoded as an SListB. The formula itself is layed out in memory in Reverse Polish Notation (RPN), and consists of «Sheet Formula Elements». Formula Lay-out 1-5 1 5 - 1+2×3 1 2 3 × + sin(10×3)-4 10 3 × sin 4 - sum(1,2,3) sum 1 2 3 sum[Sheet Formula Element][Sheet Formula Elements]Sheet Formula ElementsEach formula element is identified by a marker, which is optionally followed by more data (for example, an integer is layed out as the marker 20 followed by the four bytes of a «SInt»).There are a few special markers. Each formula ends with marker 15. Markers 2A and 2B are used to separate the arguments of the var-arg operators (see below).Marker Data following Args Description 01 2 operator < (less than)02 2 operator <= (less than or equals)03 2 operator > (greater than)04 2 operator >= (greater than or equals)05 2 operator <> (not equals)06 2 operator = (equals)07 2 operator + (addition)08 2 operator - (subtraction)09 2 operator * (multiplication)0A 2 operator / (division)0B 2 operator ^ (power)0C 1 operator + (positive prefix)0D 1 operator - (negative prefix)0E 1 operator NOT0F 2 operator AND10 2 operator OR11 2 operator & (string concatenate)12 1 brackets () 131415 0 end-of-formula161718191A1B1C1D1E1F «Float» 0 double precision floating point number (8 bytes)20 «SInt» 0 signed integer number (4 bytes)2122232425 Sheet Variable Reference 0 named variable26 BListB 0 text string27 «Sheet Cell Reference» 0 single cell reference28 «Sheet Cell Block» 0 cell block reference29 «Sheet Cell Block» 0 same as 28, but appears within vararg functions2A 0 operand separator within vararg functions2B 0 vararg operand end marker2C 2D2E2F30313233 0 FALSE34 3 IF35 0 TRUE36 2 CELL37 1 ERROR.TYPE38 1 ISBLANK39 1 ISERR3A 1 ISERROR3B 1 ISLOGICAL3C 1 ISNA3D 1 ISNONTEXT3E 1 ISNUMBER3F 1 ISTEXT40 1 N41 1 TYPE42 2 ADDRESS43 1 COLUMN44 1 COLUMNS45 3 HLOOKUP46 3 INDEX47 1 INDIRECT48 3 LOOKUP49 3 OFFSET4A 1 ROW4B 1 ROWS4C 3 VLOOKUP4D 1 CHAR4E 1 CODE4F 2 EXACT50 3 FIND51 2 LEFT52 1 LEN53 1 LOWER54 3 MID55 1 PROPER56 4 REPLACE57 2 REPT58 2 RIGHT59 2 STRING5A 1 T5B 1 TRIM5C 1 UPPER5D 1 VALUE5E 3 DATE5F 1 DATEVALUE60 1 DAY61 1 HOUR62 1 MINUTE63 1 MONTH64 0 NOW65 1 SECOND66 0 TODAY67 3 TIME68 1 TIMEVALUE69 1 YEAR6A 1 ABS6B 1 ACOS6C 1 ASIN6D 1 ATAN6E 2 ATAN26F 1 COS70 1 DEGREES71 1 EXP72 1 FACT73 1 INT74 1 LN75 1 LOG1076 2 MOD77 0 PI78 1 RADIANS79 0 RAND7A 2 ROUND7B 1 SIGN7C 1 SIN7D 1 SQRT7E 2 SUMPRODUCT7F 1 TAN80 1 TRUNC81 3 CTERM82 4 DDB83 3 FV84 2 IRR85 2 NPV86 3 PMT87 3 PV88 3 RATE89 3 SLN8A 4 SYD8B 3 TERM8C 2 COMBIN8D 2 PERMUT8E «Sheet Formula Varargs» 0 AVERAGE8F «Sheet Formula Varargs» 0 CHOOSE90 «Sheet Formula Varargs» 0 COUNT91 «Sheet Formula Varargs» 0 COUNTA92 «Sheet Formula Varargs» 0 COUNTBLANK93 «Sheet Formula Varargs» 0 MAX94 «Sheet Formula Varargs» 0 MIN95 «Sheet Formula Varargs» 0 PRODUCT96 «Sheet Formula Varargs» 0 STDEVP97 «Sheet Formula Varargs» 0 STDEV98 «Sheet Formula Varargs» 0 SUM99 «Sheet Formula Varargs» 0 SUMSQ9A «Sheet Formula Varargs» 0 VARP9B «Sheet Formula Varargs» 0 VARIn the above table, args is the number of elements 'popped' from the stack before the result is 'pushed'. As you can see, funtions with a variable number of arguments are handled specially, and never pop previous values.[Sheet Formula Varargs]Sheet Formula VarargsSome operators have a variable number of operands.Each operand in its turn consists of «Sheet Formula Elements» . The encoding is quite different from that used for normal operators. After the operator marker, the operands follow as formulas (without the initial length encoding and without the final 15 marker), separated by the 2A marker. The last operand is followed by the 2B marker, and after this the operator marker is repeated, followed by a word with the number of parameters. Schematically: Size Description B Operator marker Operand 1 («Sheet Formula Elements») B 2A marker Operand 2 («Sheet Formula Elements») .... B 2B marker B Operator marker W Number of operands  ð"Times New Roman  " Courier New " Courier Newð"Times New Romanð ð  " Courier New  ðÁG#” ™0ºž*%0(3'"$'*$!++.D3.50K8('&%&*##'&%#%$#Ýø )) ! @"Arial ð"Times New RomanFð"Times New Roman " Courier New  " Courier New  " Courier Newð ð"Times New Roman ð"Times New Roman˜ð  " Courier New  " Courier New  " Courier New" Courier Newðð  " Courier New  " Courier New " Courier New  " Courier New ð ð  " Courier New  " Courier New  " Courier New"Word.app C"yC‰G

Properties

Name Value
svn:mime-type application/octet-stream

frodo@frodo.looijaard.name
ViewVC Help
Powered by ViewVC 1.1.26