home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / pocketbk / developmen / oplhel / OPLW.DBF (.txt) < prev    next >
Psion Database  |  1992-04-09  |  19KB  |  576 lines

  1. OPLDatabaseFile
  2. PEEKB(x%),PEEKW(x%),PEEKL(x%)
  3. PEEKF(x%),PEEK$(x%)#POKEB x%,y% - Rem - format for poke.
  4. gCLOCK ON,mode%,offset%    gCLOCK ON
  5. gCLOCK OFF
  6. a$=CHR$(x%)
  7. a$=Character string(ascii)
  8. r%=ALERT(m1$,m2$,b1$,b2$,b3$)
  9. 'Displays Alert window with your message
  10. APPEND
  11.  Adds a record to a database file
  12. a%=ASC(a$)
  13. a%= ascii char for a$
  14.     gAT x%,y%
  15. 'sets cursor position in graphics window
  16. AT x%,y%
  17. #sets cursor position in text window
  18. %go back one position in database file
  19. BREAK
  20. Break out of a Do...until loop
  21. CLOSE
  22. Close a database file
  23. Clear the screen
  24. CONTINUE
  25. Jumps back to While command in
  26. WHILE...ENDWH loop<
  27. COPY src$,dest$
  28. Copy a file
  29. deleted record space not freed6
  30. (Clears the screen  of the active graphic
  31. window0
  32.     a=ACOS(x)
  33. #a=Arc cosine or inverse cosine of x
  34.     a=ASIN(x)
  35. a=arc sine or inverse sine of x
  36.     a=ATAN(x)
  37. 'a=arc tangent or inverse  tangent  of x
  38. a=ABS(x)
  39. $a=Absolute value of floating point x
  40. c$=CMD$(x%)
  41. x%=1 - 5"Returns command line argument when
  42. starting a program (See manual)+
  43. c=COS(x)
  44. c=cosine of x
  45. x=angle in radians3
  46. c%=COUNT
  47. 'c%=number of records in a database file
  48. CURSOR ON (text cursor on)
  49. CURSOR Off(text cursor off)(CURSOR id%,asc%,width%,height% (graphic)(asc%=ascent height%=font height Width%=2^
  50. &s&=DATETOSECS(yr%,mo%,dy%,hr%,mn%,sc%)
  51. &s&=seconds since 00:00 1/1/1970 at the
  52. date specified>
  53.     d$=DATIM$
  54. d$=current date and time
  55.  Fri 16 Oct 1992 16:25:30*
  56. d%=DAY
  57.  d%=current day of month (1 - 31)
  58. d$=DAYNAME$(x%)
  59. %d$=Day of the week as 3 letter string
  60. d$=Fri (TGIF)e
  61. d&=DAYS(day%,month%,year%)
  62. #d&= number of days since 01/01/1900$get number of days between two datese
  63.  dBUTTONS p1$,k1%,p2$,k2%,p3$,k3%
  64. p1$=text     k1%=keycode "defines exit keys to go at bottom 
  65. dialogM
  66. dDATE var lg&,p$,min&,max&
  67. defines an edit box for a date
  68. to go in a dialog
  69. dEDIT var str$,p$,len%%defines a string edit box to go in a  dialog. str$ is variable to edit'p$ displays on left, len% is max length,
  70. d=DEG(x)
  71.  converts from radians to degrees
  72. DELETE filename$
  73. filename$ must be closed
  74. wildcards OK
  75. dFILE var str$,p$,f%#defines filename edit box with Disk$selector. str$ must  128 char length%p$ displays on left. f% decides type.
  76. dFLOAT var fp,p$,min,max#defines edit box for floating point
  77. number. p$ dislays on left'min&,max& are minimum and maximum inputD
  78.     d%=DIALOG
  79. !presents dialog prepared by DINIT
  80. if Enter pressed p%<>0<
  81. dINIT title$
  82. dINIT%prepares for definition of new dialogl
  83. d$=DIR$(filespec$) then
  84. d$=DIR$("") Produces a  listing of filenames&includes subdirectories. Wildcards OK.v
  85. dLONG var lg&,p$,min&,max&!defines edit box for long integer
  86. p$ displays on left$min&,max&=min-max input. returns lg&E
  87. statements(actions)
  88. UNTIL condition
  89. Loops until condition is trueO
  90. dPOSITION x%,y%
  91. x%,y% can be -1,0,1
  92. -1=top / 0=center / 1=bottom
  93. dPosition 0,1b
  94. dTEXT p$,body$,t%
  95. p$ displays on left% t%=alignment 0=left 1=right 2=center
  96. body$=text to display
  97. dTIME var lg&,p$,t%,min&,max&(defines an edit box for a time  to go in'a dialog . p$=left t%=time display type
  98. 0-1=absolute 2-3=durationJ
  99. dXINPUT var str$,p$
  100.  Secret input&displays lock character for each input0
  101. ERASE
  102. 'Erase current record of a database file
  103. e%=ERR
  104. e$=ERR$
  105. e%=error number
  106. e$=error stringC
  107. ESCAPE OFF
  108. . . .    ESCAPE ON'stops Psion<Esc> from exiting a programT
  109. d=EVAL(s$)
  110. Evaluates a mathematical string's$ can include any function or operatorJ
  111. e%=EXIST(filename$)
  112. e%=-1 if the file exists
  113. e%=0 if file does not existL
  114. e=EXP(x)
  115. (e=val of arithmetic constant(2.71828...)
  116. raised to the power of x5
  117.     EXT name$
  118. "Gives file extension to be used by
  119. an OPAa
  120. f%=FIND(a$)
  121. f%=0 if not found&searches a database file for string a$
  122. f%=position found if exists
  123. EDIT a$ / EDIT a.a$
  124.  Edit a variable in a text window
  125. Edit a field in a database file
  126. r%=IOOPEN(h%,name$,mode%)
  127. r%=IOCLOSE(h%)
  128. r%=IOREAD(h%,addr%,maxlen%)
  129. r%=IOWRITE(h%,addr%,length%)
  130. r%=IOSEEK(h%,mode%,off&)
  131. r%=IOW(h%,func%,a1,a2)
  132. r%=IOA(h%,f%,status%,a1,a2)
  133. IOWAIT
  134. IOSIGNAL
  135. IOYIELD
  136. IOWAITSTAT stat%
  137. CONNECT 20 GOTO again
  138. Waits by 1/2 secs for Handshake
  139. HANGUP
  140. drops DTR for 3 sec's
  141. Modem will hangup'
  142. RESET
  143. set parameters back to original
  144. SETUP (BAUD=? :PARITY=? :DATA=?#STOP=? :HANDSHAKE=? :FAIL=? :ECHO=?!NEWLINE=? :BACKSPACE=? :TIMEOUT=?:
  145. !ON REPLY  CONNECT 2400 goto label
  146. in brackets after wait
  147. SEND PW$
  148. SEND "ATZ"
  149. ,SENDWAIT 10"COMPUSERVE","USER ID:" goto next
  150. WAIT 40
  151. waits 20 seconds
  152. CAPTURE filename$
  153. Captures all data to a file
  154. EXISTS fn$ goto next
  155. checks for existing file
  156. jumps if existsG
  157. NEXISTS fn$ goto next
  158. checks for existing file
  159. jumps if does not existQ
  160. RECEIVE fn$, XMDM
  161. XMDM,XMCRC,XM1K,YMDM,YMDMG#YM1K,YG1K Rem -- receive w/Protocol 
  162. TRANSMIT fn$, XMDM
  163. see RECEIVE
  164. ALERT message$
  165. Displays alert
  166. BEEP x%,y%
  167. INFO mess$
  168.  displays message on bottom right8
  169. MENU title$ (c1$ goto redo
  170. c2$ goto send
  171. c3$ goto quit)+
  172. PASSWORD
  173.  ask for Pw of current names file
  174. QUERY
  175. CALL script2$
  176. "stops current script, starts other
  177. stop ruuning script
  178. GOTO label
  179. jumps to a label
  180. set a counter :c1=10"
  181. DRAIN
  182. empties the receive buffer?
  183. e%=EOF
  184. End of file
  185. Databse file must be open
  186. -1=true 0=false A
  187. FIRST
  188. $Positions to the first record in the
  189. current data  file.
  190. f$=fix$(x,y%,z%)
  191. $Returns a string representation of x
  192. to y% decimal places(Useful for converting a number to stringI
  193.     f=FLT(x&)
  194. #Converts an integer expression into
  195. a floating point number.
  196. gBORDER flags%,width%,height%)
  197. width%,height% optional
  198. $Draws a one pixel border around the 
  199. current drawable.b
  200. gBOX width%,height%)
  201. %Draws a box from the current position$width% to the left and height% down.
  202. gCLOSE win%
  203. $Closes graphic window with id (win%)
  204. Every graphic window has an id.
  205. gCOPY id%,x%,y%,w%,h%,mode%%Copies rectangle of spec'd size w%,h%%from the point x%,y% in drawable id%,'to the current position in the current (drawable. mode% 0,1,2,3 set,clr,inv,replz
  206. id%=gCREATEBIT(width%,height%)
  207. %Creates a bitmap with the spec'd size!and makes it the current drawable
  208. Returns id% (2-8)
  209. gCREATE(x%,y%,w%,h%,v%)
  210. v%= ON or OFF!creates a window with spec'd size
  211. w%=width h%=height%at position x%,y%  /Returns id% (2-8)c
  212. g$=GEN$(x,y%)
  213. Returns a string rep of x
  214. up to y% char's in length
  215. if y%<0 will be right justifiedR
  216. g%=GET
  217. g$=GET$
  218. $Waits for a keypress and returns the
  219. character code for that key.
  220. w$=GETCMD$!Return NEW command-line arguments'to an OPA, after a change files or quit
  221. event has occurred.
  222. First char of  w$  is C,O,XZ
  223. GETEVENT var a%()
  224. Waits for an event to occur. 'Returns with a%() specifying the event.
  225. gFILL width%,height%,gMode%
  226. #Fill a rectangle of the spec'd size"from the current pos, according to
  227. gMode%W
  228. gGMODE mode%
  229. 0=set 1=cleared 2=inv(Set the effect of all subsequent drawing    commands.=
  230. height%=gHEIGHT
  231.  Returns the height of th current    drawable.
  232. id%=gIDENTITY
  233. &Returns the id of the current drawable
  234. gINFO var i%()#Gets general info about the current
  235. drawable and graphics cusor.
  236. $See manual for list of info returned
  237. gINVERT width%,height%
  238. #Inverts the rectangle width% to the'right and height% down from the cursor %pos,except for the four corner pixels
  239. GIPRINT str$,c%$Displays info message for two sec's.
  240. c% sets corner for message.
  241. 0 = top left / 1 = bottom left 2 = top right / 3 = bottom rightI
  242. gLINEBY dx%,dy%
  243. Draws a line from current pos
  244. dx% to the right
  245. dy% downd
  246. gLINETO x%,y%
  247. !Draws a line from the current pos
  248. to point x%,y%#single point=gLINETO to current posg
  249. gFONT fontid%
  250. %Sets the font for current drawable to    fontid%. 'Use gLoadfont to load user defined font
  251. gLOADBIT(name$,write%,i%)&write% 0=readonly 1=readwrite .Loads a& bitmap from the named bitmap file and( makes it the current drawable. ext=.pic"i%=which bitmap to use if multiplep
  252. fontid%=gLOADFONT(name$)
  253. #Loads the user defined font (name$)$Returns a font id. Use gfont to make
  254. active font.r
  255. GLOBAL variables
  256. (Declares variables to be used in current(procedure, or any subsequent procedures 
  257. called by it.
  258. gMOVE dx%,dy%&Moves the current pos dx% to the right"and dy% downwards, in the current "drawable. Negative dx% moves left.
  259. Negative dy% moves upward.F
  260. gORDER id%,position%
  261. Reorders position of windows
  262. positions are 1-8
  263. x%=gORIGINX
  264. 'Returns gap between left side of screen#and left side of the current window
  265. Cant be a bitmap.Z
  266. y%=gORIGINY
  267. "Returns gap between the top of th