home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / devtools / sbl / sblinf.ipf < prev   
Encoding:
Information Presentation Facility markup  |  1993-03-31  |  205.5 KB  |  4,556 lines

  1. :userdoc.
  2. :title.SBL Reference
  3. :h1 res=8 width=50% height=100% x=left y=bottom group=1.Statements and Functions
  4. :i1 id=ix1.Statements and Functions
  5. :sl compact.
  6. :li.
  7. :hp2.Overview:ehp2.
  8. :li.
  9. :li.
  10. The Overview contains a list of all Help topics available for :hp5.BASIC:ehp5. functions and 
  11. statements&per.  Overview items are arranged in alphabetical order within each major 
  12. category&per.  You can use the scroll bar to see the entries that are not currently 
  13. visible in the Help window&per.
  14. :li.
  15. :li.
  16. For information on how to use Help, press F1 or choose Using Help from the Help 
  17. menu&per.
  18. :li.
  19. :li.
  20. :hp2.Statements and Functions:ehp2.
  21. :font facename=Helv size=16x10.
  22. :li.
  23. :li.
  24. :link reftype=hd res=10050.:lm margin=1.:hp5.Abs:ehp5.:elink.:lm margin=20.Return the absolute value of a number
  25. :li.
  26. :link reftype=hd res=10100.:lm margin=1.:hp5.Asc:ehp5.:elink.:lm margin=20.Return an integer corresponding to a character code
  27. :li.
  28. :link reftype=hd res=10105.:lm margin=1.:hp5.Assert:ehp5.:elink.:lm margin=20.Trigger an error if a condition is false
  29. :li.
  30. :link reftype=hd res=10108.:lm margin=1.:hp5.Atn:ehp5.:elink.:lm margin=20.Return the arctangent of a number
  31. :li.
  32. :link reftype=hd res=10110.:lm margin=1.:hp5.Beep:ehp5.:elink.:lm margin=20.Produce a short beeping tone through the speaker
  33. :li.
  34. :link reftype=hd res=10115.:lm margin=1.:hp5.Begin Dialog:ehp5.:elink.:lm margin=20.Begin a dialog-box definition
  35. :li.
  36. :link reftype=hd res=10120.:lm margin=1.:hp5.Button:ehp5.:elink.:lm margin=20.Define a button dialog-box control
  37. :li.
  38. :link reftype=hd res=10125.:lm margin=1.:hp5.ButtonGroup:ehp5.:elink.:lm margin=20.Begin definition of a group of button dialog-box 
  39. controls
  40. :li.
  41. :link reftype=hd res=10200.:lm margin=1.:hp5.Call:ehp5.:elink.:lm margin=20.Transfer control to a subprogram
  42. :li.
  43. :link reftype=hd res=10205.:lm margin=1.:hp5.CancelButton:ehp5.:elink.:lm margin=20.Define a cancel-button dialog-box control
  44. :li.
  45. :link reftype=hd res=10208.:lm margin=1.:hp5.Caption:ehp5.:elink.:lm margin=20.Define the title of a dialog-box
  46. :li.
  47. :link reftype=hd res=10209.:lm margin=1.:hp5.CDbl:ehp5.:elink.:lm margin=20.Convert a number to double-precision floating point&per.
  48. :li.
  49. :link reftype=hd res=10210.:lm margin=1.:hp5.ChDir:ehp5.:elink.:lm margin=20.Change the default directory for a drive
  50. :li.
  51. :link reftype=hd res=10220.:lm margin=1.:hp5.ChDrive:ehp5.:elink.:lm margin=20.Change the default drive
  52. :li.
  53. :link reftype=hd res=10222.:lm margin=1.:hp5.CheckBox:ehp5.:elink.:lm margin=20.Define a checkbox dialog-box control
  54. :li.
  55. :link reftype=hd res=10225.:lm margin=1.:hp5.Chr$:ehp5.:elink.:lm margin=20.Return a string containing a single character that 
  56. corresponds to a character code
  57. :li.
  58. :link reftype=hd res=10227.:lm margin=1.:hp5.CInt:ehp5.:elink.:lm margin=20.Convert a number to an integer by rounding&per.
  59. :li.
  60. :link reftype=hd res=10229.:lm margin=1.:hp5.CLng:ehp5.:elink.:lm margin=20.Convert a number to a long by rounding&per.
  61. :li.
  62. :link reftype=hd res=10230.:lm margin=1.:hp5.Close:ehp5.:elink.:lm margin=20.Close a file
  63. :li.
  64. :link reftype=hd res=10250.:lm margin=1.:hp5.ComboBox:ehp5.:elink.:lm margin=20.Define a combobox dialog-box control
  65. :li.
  66. :link reftype=hd res=10400.:lm margin=1.:hp5.Command$:ehp5.:elink.:lm margin=20.Return the command line specified when the INIT or 
  67. MAIN sub was run
  68. :li.
  69. :link reftype=hd res=10425.:lm margin=1.:hp5.Const:ehp5.:elink.:lm margin=20.Declare a symbolic constant
  70. :li.
  71. :link reftype=hd res=10437.:lm margin=1.:hp5.Cos:ehp5.:elink.:lm margin=20.Return the cosine of an angle&per.
  72. :li.
  73. :link reftype=hd res=10445.:lm margin=1.:hp5.CSng:ehp5.:elink.:lm margin=20.Convert a number to single-precision floating point&per.
  74. :li.
  75. :link reftype=hd res=10450.:lm margin=1.:hp5.$CStrings:ehp5.:elink.:lm margin=20.Tell the compiler to treat a backslash as an escape 
  76. character in the same way that the 'C' language does
  77. :li.
  78. :link reftype=hd res=10455.:lm margin=1.:hp5.CurDir$:ehp5.:elink.:lm margin=20.Return the current directory for a drive
  79. :li.
  80. :link reftype=hd res=10460.:lm margin=1.:hp5.Date$:ehp5.:elink.:lm margin=20.Return the current date
  81. :li.
  82. :link reftype=hd res=10500.:lm margin=1.:hp5.Declare:ehp5.:elink.:lm margin=20.Forward declare a procedure in the same module or in 
  83. a dynamic link library
  84. :li.
  85. :lm margin=1.:hp5.Def:ehp5.:link reftype=hd res=10525.:hp6.type:ehp6.:elink.:lm margin=20.Declare the default data type for variables
  86. :li.
  87. :link reftype=hd res=10550.:lm margin=1.:hp5.Dialog:ehp5.:elink.:lm margin=20.Display a dialog box
  88. :li.
  89. :link reftype=hd res=10600.:lm margin=1.:hp5.Dim:ehp5.:elink.:lm margin=20.Declare variables for use in a method
  90. :li.
  91. :link reftype=hd res=10610.:lm margin=1.:hp5.Dir$:ehp5.:elink.:lm margin=20.Return a filename which matches a pattern
  92. :li.
  93. :link reftype=hd res=10612.:lm margin=1.:hp5.Do&per.&per.&per.Loop:ehp5.:elink.:lm margin=20.Control repetitive actions
  94. :li.
  95. :link reftype=hd res=10615.:lm margin=1.:hp5.Environ$:ehp5.:elink.:lm margin=20.Return a string from the operating system's 
  96. environment
  97. :li.
  98. :link reftype=hd res=10620.:lm margin=1.:hp5.Eof:ehp5.:elink.:lm margin=20.Check for end of file
  99. :li.
  100. :link reftype=hd res=10640.:lm margin=1.:hp5.Erl:ehp5.:elink.:lm margin=20.Return the line number where a run-time error 
  101. occurred
  102. :li.
  103. :link reftype=hd res=10645.:lm margin=1.:hp5.Err Function:ehp5.:elink.:lm margin=20.Return a run-time error code
  104. :li.
  105. :link reftype=hd res=10646.:lm margin=1.:hp5.Err Statement:ehp5.:elink.:lm margin=20.Set the run-time error code
  106. :li.
  107. :link reftype=hd res=10650.:lm margin=1.:hp5.Error:ehp5.:elink.:lm margin=20.Generate an error condition
  108. :li.
  109. :link reftype=hd res=10655.:lm margin=1.:hp5.Error$ Function:ehp5.:elink.:lm margin=20.Return a string representing an error
  110. :li.
  111. :link reftype=hd res=10700.:lm margin=1.:hp5.Exit:ehp5.:elink.:lm margin=20.Cause the current procedure or loop structure to 
  112. return
  113. :li.
  114. :link reftype=hd res=10705.:lm margin=1.:hp5.Exp:ehp5.:elink.:lm margin=20.Return the value of :hp1.e :ehp1.raised to a power
  115. :li.
  116. :link reftype=hd res=10710.:lm margin=1.:hp5.FileAttr:ehp5.:elink.:lm margin=20.Return information about an open file
  117. :li.
  118. :link reftype=hd res=10730.:lm margin=1.:hp5.Fix:ehp5.:elink.:lm margin=20.Return the integer part of a number
  119. :li.
  120. :link reftype=hd res=10740.:lm margin=1.:hp5.For&per.&per.&per.Next:ehp5.:elink.:lm margin=20.Loop a fixed number of times
  121. :li.
  122. :link reftype=hd res=10750.:lm margin=1.:hp5.FreeFile:ehp5.:elink.:lm margin=20.Return the next unused file number
  123. :li.
  124. :link reftype=hd res=10900.:lm margin=1.:hp5.Function:ehp5.:elink.:lm margin=20.Define a function
  125. :li.
  126. :link reftype=hd res=10950.:lm margin=1.:hp5.GetCurValues:ehp5.:elink.:lm margin=20.Retrieve current values for a dialog box
  127. :li.
  128. :link reftype=hd res=11000.:lm margin=1.:hp5.GetField$:ehp5.:elink.:lm margin=20.Return a substring from a delimited source string
  129. :li.
  130. :link reftype=hd res=11050.:lm margin=1.:hp5.Global:ehp5.:elink.:lm margin=20.Declare a global variable
  131. :li.
  132. :link reftype=hd res=11100.:lm margin=1.:hp5.Goto:ehp5.:elink.:lm margin=20.Send control to a line label
  133. :li.
  134. :link reftype=hd res=11150.:lm margin=1.:hp5.GroupBox:ehp5.:elink.:lm margin=20.Define a groupbox in a dialog-box
  135. :li.
  136. :link reftype=hd res=11180.:lm margin=1.:hp5.Hex$:ehp5.:elink.:lm margin=20.Return the hexadecimal representation of a number, 
  137. as a string
  138. :li.
  139. :link reftype=hd res=11200.:lm margin=1.:hp5.If&per.&per.&per.Then&per.&per.&per.Else:ehp5.:elink.:lm margin=20.Branch on a conditional value
  140. :li.
  141. :link reftype=hd res=11250.:lm margin=1.:hp5.$Include:ehp5.:elink.:lm margin=20.Tell the compiler to include statements from another 
  142. file
  143. :li.
  144. :link reftype=hd res=11260.:lm margin=1.:hp5.Input$ Function:ehp5.:elink.:lm margin=20.Return a string of characters from a file
  145. :li.
  146. :link reftype=hd res=11270.:lm margin=1.:hp5.Input Statement:ehp5.:elink.:lm margin=20.Read data from a file or from the keyboard
  147. :li.
  148. :link reftype=hd res=11280.:lm margin=1.:hp5.InputBox$:ehp5.:elink.:lm margin=20.Display a dialog-box which prompts for input
  149. :li.
  150. :link reftype=hd res=11300.:lm margin=1.:hp5.Instr:ehp5.:elink.:lm margin=20.Return the position of one string within another
  151. :li.
  152. :link reftype=hd res=11310.:lm margin=1.:hp5.Int:ehp5.:elink.:lm margin=20.Return the integer part of a number
  153. :li.
  154. :link reftype=hd res=11320.:lm margin=1.:hp5.Kill:ehp5.:elink.:lm margin=20.Delete files from a disk
  155. :li.
  156. :link reftype=hd res=11360.:lm margin=1.:hp5.LBound:ehp5.:elink.:lm margin=20.Return the lower bound of an array's dimension
  157. :li.
  158. :link reftype=hd res=11400.:lm margin=1.:hp5.Lcase$:ehp5.:elink.:lm margin=20.Convert a string to lower case
  159. :li.
  160. :link reftype=hd res=11500.:lm margin=1.:hp5.Left$:ehp5.:elink.:lm margin=20.Return the left portion of a string
  161. :li.
  162. :link reftype=hd res=11600.:lm margin=1.:hp5.Len:ehp5.:elink.:lm margin=20.Return the length of a string
  163. :li.
  164. :link reftype=hd res=11700.:lm margin=1.:hp5.Let:ehp5.:elink.:lm margin=20.Assign a numeric or string value to a variable
  165. :li.
  166. :link reftype=hd res=11710.:lm margin=1.:hp5.Line Input:ehp5.:elink.:lm margin=20.Read a line from a sequential file
  167. :li.
  168. :link reftype=hd res=11715.:lm margin=1.:hp5.ListBox:ehp5.:elink.:lm margin=20.Define a listbox dialog-box control
  169. :li.
  170. :link reftype=hd res=11720.:lm margin=1.:hp5.Lof:ehp5.:elink.:lm margin=20.Return the length of an open file
  171. :li.
  172. :link reftype=hd res=11730.:lm margin=1.:hp5.Log:ehp5.:elink.:lm margin=20.Return the natural logarithm of a value
  173. :li.
  174. :link reftype=hd res=11800.:lm margin=1.:hp5.Ltrim$:ehp5.:elink.:lm margin=20.Remove leading spaces in a string
  175. :li.
  176. :link reftype=hd res=11900.:lm margin=1.:hp5.Mid$ Function:ehp5.:elink.:lm margin=20.Return a portion of a string
  177. :li.
  178. :link reftype=hd res=11890.:lm margin=1.:hp5.Mid$ Statement:ehp5.:elink.:lm margin=20.Replace a portion of a string with another string
  179. :li.
  180. :link reftype=hd res=11910.:lm margin=1.:hp5.MkDir:ehp5.:elink.:lm margin=20.Make a directory on a disk
  181. :li.
  182. :link reftype=hd res=12000.:lm margin=1.:hp5.MsgBox Function:ehp5.:elink.:lm margin=20.Display a Windows message box
  183. :li.
  184. :link reftype=hd res=12010.:lm margin=1.:hp5.MsgBox Statement:ehp5.:elink.:lm margin=20.Display a Windows message box
  185. :li.
  186. :link reftype=hd res=12020.:lm margin=1.:hp5.Name:ehp5.:elink.:lm margin=20.Rename a disk file
  187. :li.
  188. :link reftype=hd res=12050.:lm margin=1.:hp5.$NoCStrings:ehp5.:elink.:lm margin=20.Tell the compiler to treat a backslash as normal 
  189. character
  190. :li.
  191. :link reftype=hd res=12053.:lm margin=1.:hp5.Oct$:ehp5.:elink.:lm margin=20.Return the octal representation of a number, as a 
  192. string
  193. :li.
  194. :link reftype=hd res=12055.:lm margin=1.:hp5.OKButton:ehp5.:elink.:lm margin=20.Define an OK button dialog-box control
  195. :li.
  196. :link reftype=hd res=12060.:lm margin=1.:hp5.On Error:ehp5.:elink.:lm margin=20.Control run-time error handling
  197. :li.
  198. :link reftype=hd res=12070.:lm margin=1.:hp5.Open:ehp5.:elink.:lm margin=20.Open a disk file or device for I/O
  199. :li.
  200. :link reftype=hd res=12073.:lm margin=1.:hp5.Option Base:ehp5.:elink.:lm margin=20.Declare the default lower bound for array dimensions
  201. :li.
  202. :link reftype=hd res=12075.:lm margin=1.:hp5.OptionButton:ehp5.:elink.:lm margin=20.Define a optionbutton dialog-box control
  203. :li.
  204. :link reftype=hd res=12076.:lm margin=1.:hp5.OptionGroup:ehp5.:elink.:lm margin=20.Begin definition of a group of optionbutton 
  205. dialog-box controls
  206. :li.
  207. :link reftype=hd res=12080.:lm margin=1.:hp5.Print:ehp5.:elink.:lm margin=20.Print data to a file or to the screen
  208. :li.
  209. :link reftype=hd res=12085.:lm margin=1.:hp5.Randomize:ehp5.:elink.:lm margin=20.Initialize the random-number generator
  210. :li.
  211. :lm margin=1.:hp5.Re:ehp5.:link reftype=hd res=12087.:hp5.Dim:ehp5.:elink.:lm margin=20.Declare dynamic arrays and reallocate memory
  212. :li.
  213. :link reftype=hd res=12089.:lm margin=1.:hp5.Rem:ehp5.:elink.:lm margin=20.Treat the remainder of the line as a comment
  214. :li.
  215. :link reftype=hd res=12090.:lm margin=1.:hp5.Reset:ehp5.:elink.:lm margin=20.Close all open disk files
  216. :li.
  217. :link reftype=hd res=12095.:lm margin=1.:hp5.Resume:ehp5.:elink.:lm margin=20.End an error-handling routine
  218. :li.
  219. :link reftype=hd res=12100.:lm margin=1.:hp5.Right$:ehp5.:elink.:lm margin=20.Return the right portion of a string
  220. :li.
  221. :link reftype=hd res=12110.:lm margin=1.:hp5.RmDir:ehp5.:elink.:lm margin=20.Remove a directory from a disk
  222. :li.
  223. :link reftype=hd res=12120.:lm margin=1.:hp5.Rnd:ehp5.:elink.:lm margin=20.Return a random number
  224. :li.
  225. :link reftype=hd res=12130.:lm margin=1.:hp5.Rtrim$:ehp5.:elink.:lm margin=20.Remove trailing spaces in a string
  226. :li.
  227. :link reftype=hd res=12140.:lm margin=1.:hp5.Seek Function:ehp5.:elink.:lm margin=20.Return the current  position for a file
  228. :li.
  229. :link reftype=hd res=12150.:lm margin=1.:hp5.Seek:ehp5.:elink.:lm margin=20.Set the current  position for a file
  230. :li.
  231. :link reftype=hd res=12200.:lm margin=1.:hp5.Select Case:ehp5.:elink.:lm margin=20.Execute one of a series of statement blocks
  232. :li.
  233. :link reftype=hd res=12300.:lm margin=1.:hp5.SetField$:ehp5.:elink.:lm margin=20.Replace a substring within a delimited target string
  234. :li.
  235. :link reftype=hd res=12310.:lm margin=1.:hp5.Sgn:ehp5.:elink.:lm margin=20.Return a value indicating the sign of a number
  236. :li.
  237. :link reftype=hd res=12320.:lm margin=1.:hp5.Shell:ehp5.:elink.:lm margin=20.Run an executable program
  238. :li.
  239. :link reftype=hd res=12322.:lm margin=1.:hp5.Sin:ehp5.:elink.:lm margin=20.Return the sine of an angle
  240. :li.
  241. :link reftype=hd res=12325.:lm margin=1.:hp5.Space$:ehp5.:elink.:lm margin=20.Return a string of spaces
  242. :li.
  243. :link reftype=hd res=12327.:lm margin=1.:hp5.Sqr:ehp5.:elink.:lm margin=20.Return the square root of a number
  244. :li.
  245. :link reftype=hd res=12330.:lm margin=1.:hp5.Stop:ehp5.:elink.:lm margin=20.Stop program execution
  246. :li.
  247. :link reftype=hd res=12400.:lm margin=1.:hp5.Str$:ehp5.:elink.:lm margin=20.Return the string representation of a number
  248. :li.
  249. :link reftype=hd res=12410.:lm margin=1.:hp5.String$:ehp5.:elink.:lm margin=20.Return a string consisting of a repeated character
  250. :li.
  251. :link reftype=hd res=12500.:lm margin=1.:hp5.Sub&per.&per.&per.End Sub:ehp5.:elink.:lm margin=20.Define a subprogram
  252. :li.
  253. :link reftype=hd res=12502.:lm margin=1.:hp5.Tan:ehp5.:elink.:lm margin=20.Return the tanget of an angle
  254. :li.
  255. :link reftype=hd res=12505.:lm margin=1.:hp5.Text:ehp5.:elink.:lm margin=20.Define a line of text in a dialog-box
  256. :li.
  257. :link reftype=hd res=12506.:lm margin=1.:hp5.TextBox:ehp5.:elink.:lm margin=20.Define a line of textbox in a dialog-box
  258. :li.
  259. :link reftype=hd res=12510.:lm margin=1.:hp5.Time$:ehp5.:elink.:lm margin=20.Return the current time
  260. :li.
  261. :link reftype=hd res=12520.:lm margin=1.:hp5.Timer:ehp5.:elink.:lm margin=20.Return the number of seconds since midnight
  262. :li.
  263. :link reftype=hd res=12560.:lm margin=1.:hp5.Type:ehp5.:elink.:lm margin=20.Declare a user-defined data type
  264. :li.
  265. :link reftype=hd res=12580.:lm margin=1.:hp5.UBound:ehp5.:elink.:lm margin=20.Return the upper bound of an array's dimension
  266. :li.
  267. :link reftype=hd res=12600.:lm margin=1.:hp5.Ucase$:ehp5.:elink.:lm margin=20.Convert a string to upper case
  268. :li.
  269. :link reftype=hd res=12700.:lm margin=1.:hp5.Val:ehp5.:elink.:lm margin=20.Convert a string to a number
  270. :li.
  271. :link reftype=hd res=12800.:lm margin=1.:hp5.While&per.&per.&per.Wend:ehp5.:elink.:lm margin=20.Control repetitive actions
  272. :li.
  273. :link reftype=hd res=12810.:lm margin=1.:hp5.Write:ehp5.:elink.:lm margin=20.Write data to a sequential file
  274. :li.
  275. :li.
  276. :hp2.Miscellaneous:ehp2.
  277. :li.
  278. :li.
  279. :link reftype=hd res=20000.:lm margin=1.:hp5.Expressions:ehp5.:elink.:lm margin=20.How to form expressions
  280. :li.
  281. :link reftype=hd res=20100.:lm margin=1.:hp5.Type Conversion:ehp5.:elink.:lm margin=20.Converting between different data types
  282. :li.
  283. :link reftype=hd res=20200.:lm margin=1.:hp5.App Data Types:ehp5.:elink.:lm margin=20.Extended data types defined through API functions
  284. :li.
  285. :link reftype=hd res=20300.:lm margin=1.:hp5.Dialog Box Records:ehp5.:elink.:lm margin=20.Control of dialog box data
  286. :li.
  287. :link reftype=hd res=1.:lm margin=1.:hp5.Trappable Errors:ehp5.:elink.:lm margin=20.Errors which can be trapped by SBL code
  288. :li.
  289. :link reftype=hd res=30000.:lm margin=1.:hp5.Glossary:ehp5.:elink.:lm margin=20.Definitions of common terms
  290. :font facename=default size=0x0.
  291. :li.
  292. :esl.
  293. :h2 x=right y=bottom width=50% height=100% res=10050.Abs
  294. :i1 id=ix2.Abs
  295. :i1 id=ix3.Function List
  296. :i2 refid=ix3.Abs
  297. :i1 id=ix4.Numbers
  298. :i2 refid=ix4.Abs
  299. :sl compact.
  300. :hp2.Abs Function:ehp2.
  301. :li.
  302. :li.
  303. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Abs( :ehp2.:hp1.numeric-expression:ehp1.:hp2. ):ehp2.:lm margin=1.
  304. :li.
  305. :li.
  306. :hp2.Returns:ehp2.:lm margin=14.The :hp2.Abs:ehp2. function returns the absolute value of the specified 
  307. numeric expression&per.:lm margin=1.
  308. :li.
  309. :esl.
  310. :h2 x=right y=bottom width=50% height=100% res=10100.Asc
  311. :i1 id=ix5.Asc
  312. :i1 id=ix6.Strings
  313. :i2 refid=ix6.Asc
  314. :i2 refid=ix4.Asc
  315. :i2 refid=ix3.Asc
  316. :i1 id=ix7.Type Conversion
  317. :i2 refid=ix7.Asc
  318. :sl compact.
  319. :hp2.Asc Function:ehp2.
  320. :li.
  321. :li.
  322. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Asc( :ehp2.:hp1.string-expression$:ehp1.:hp2. ):ehp2.:lm margin=1.
  323. :li.
  324. :li.
  325. :hp2.Returns:ehp2.:lm margin=14.The :hp2.Asc:ehp2. function returns an integer corresponding to the ANSI code 
  326. of the first character in the specified string&per.  See :link reftype=hd res=10225.:hp7.Chr$:ehp7.:elink.&per.:lm margin=1.
  327. :li.
  328. :esl.
  329. :h2 x=right y=bottom width=50% height=100% res=10105.Assert
  330. :i1 id=ix8.Assert
  331. :i1 id=ix9.Statement List
  332. :i2 refid=ix9.Assert
  333. :sl compact.
  334. :hp2.Assert Statement:ehp2.
  335. :li.
  336. :li.
  337. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Assert:ehp2. :hp1.condition:ehp1.:lm margin=1.
  338. :li.
  339. :li.
  340. :hp2.Comment:ehp2.:lm margin=14.The :hp2.Assert:ehp2. statement triggers an error if the :hp1.condition:ehp1. is FALSE&per.  
  341. An assertion error cannot be trapped by the :link reftype=hd res=12060.:hp7.ON ERROR:ehp7.:elink. statement&per.:lm margin=1.
  342. :li.
  343. :lm margin=14.The :hp2.Assert:ehp2. statement is intended to help ensure that a procedure 
  344. is performing in the expected manner&per.:lm margin=1.
  345. :li.
  346. :esl.
  347. :h2 x=right y=bottom width=50% height=100% res=10108.Atn
  348. :i1 id=ix10.Atn
  349. :i2 refid=ix3.Atn
  350. :i1 id=ix11.Trigonometric Functions
  351. :i2 refid=ix11.Atn
  352. :sl compact.
  353. :hp2.Atn Function:ehp2.
  354. :li.
  355. :li.
  356. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Atn( :ehp2.:hp1.numeric-expression:ehp1.:hp2. ):ehp2.:lm margin=1.
  357. :li.
  358. :li.
  359. :hp2.Returns:ehp2.:lm margin=14.The :hp2.Atn:ehp2. function returns the angle (in radians) corresponding to 
  360. the arctangent of the specified numeric expression&per.  :lm margin=1.
  361. :li.
  362. :li.
  363. :hp2.Comment:ehp2.:lm margin=14.The return value is single-precision for an integer or 
  364. single-precision numeric expression, double precision for a long or 
  365. double-precision numeric expression&per.:lm margin=1.
  366. :li.
  367. :esl.
  368. :h2 x=right y=bottom width=50% height=100% res=10110.Beep
  369. :i1 id=ix12.Beep
  370. :i2 refid=ix9.Beep
  371. :sl compact.
  372. :hp2.Beep Statement:ehp2.
  373. :li.
  374. :li.
  375. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Beep:ehp2.:lm margin=1.
  376. :li.
  377. :li.
  378. :hp2.Comment:ehp2.:lm margin=14.The :hp2.Beep:ehp2. statement produces a single short beeping tone through 
  379. the computer speaker&per.:lm margin=1.
  380. :li.
  381. :esl.
  382. :h2 x=right y=bottom width=50% height=100% res=10115.Begin Dialog
  383. :i1 id=ix13.Begin Dialog
  384. :i2 refid=ix9.Begin Dialog
  385. :i1 id=ix14.Dialog Boxes
  386. :i2 refid=ix14.Begin Dialog
  387. :i1 id=ix15.Input
  388. :i2 refid=ix15.Begin Dialog
  389. :sl compact.
  390. :hp2.Begin Dialog &per.&per.&per. End Dialog Statement:ehp2.
  391. :li.
  392. :li.
  393. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Begin Dialog :ehp2.:hp1.dialogName:ehp1.:hp2. :ehp2.[:hp1.x, y:ehp1.:hp2.,:ehp2.] :hp1.dx, dy:ehp1.
  394. :li.
  395. :lm margin=14.' dialog box definition statements
  396. :li.
  397. :hp2.End Dialog:ehp2.:lm margin=1.
  398. :li.
  399. :li.
  400. :hp2.Comments:ehp2.:lm margin=14.The :hp2.Begin Dialog:ehp2. statement is used to start the dialog-box 
  401. declaration for a user-defined dialog box&per.  :lm margin=1.
  402. :li.
  403. :lm margin=14.The :hp1.x:ehp1. and :hp1.y:ehp1. arguments give the coordinates that position the 
  404. dialog box&per.  These coordinates designate the position of the upper left corner 
  405. of the dialog box, relative to the upper left corner of the client area of the 
  406. parent window&per.  The :hp1.x:ehp1. argument is measured in units that are 1/4 the average 
  407. width of the system font&per.  The :hp1.y :ehp1.argument is measured in units 1/8 the height 
  408. of the system font&per.  (E&per.g&per., to position a dialog box 20 characters in, and 15 
  409. characters down from the upper left hand corner, enter 80, 120 as the :hp1.x, y :ehp1.
  410. coordinates&per.)  If these arguments are omitted, the dialog box is centered in 
  411. the client area of the parent window&per. :lm margin=1.
  412. :li.
  413. :lm margin=14.The:hp1. dx :ehp1.and :hp1.dy:ehp1. arguments specify the width and height of the dialog 
  414. box (relative to the:hp1. x:ehp1. and :hp1.y :ehp1.coordinates)&per.  The :hp1.dx:ehp1. argument is measured in 1/4 
  415. system-font character-width units&per.  The :hp1.dy :ehp1.argument is measured in 1/8 
  416. system-font character-width units&per.  (I&per.e&per., to create a dialog box 80 characters 
  417. wide, and 15 characters in height,  enter 320, 120 as the :hp1.dx, dy :ehp1.coordinates&per.):lm margin=1.
  418. :li.
  419. :lm margin=14.The :hp2.Begin Dialog:ehp2. statement assumes that if only two arguments are 
  420. given, they are the :hp1.dx:ehp1. (width) and :hp1.dy:ehp1. (height) arguments&per.  :lm margin=1.
  421. :li.
  422. :lm margin=14.Unless the :hp2.Begin Dialog:ehp2. statement is followed by at least one 
  423. other dialog-box definition statement and the :hp2.End Dialog:ehp2. statement, an error 
  424. will result&per.  The other definition statement must include an :link reftype=hd res=12055.:hp7.OkButton:ehp7.:elink. or :link reftype=hd res=10205.:hp7.
  425. CancelButton:ehp7.:elink. or :link reftype=hd res=10120.:hp7.Button:ehp7.:elink. statement&per.  If this statement is left out, there will be 
  426. no way to close the dialog box, and the procedure will be unable to continue 
  427. executing&per. :lm margin=1.
  428. :li.
  429. :lm margin=14.To display the dialog box, you create a dialog record variable 
  430. with the :link reftype=hd res=10600.:hp7.Dim:ehp7.:elink. statement, and then display the dialog box using the :link reftype=hd res=10550.:hp7.Dialog:ehp7.:elink. 
  431. statement&per. In the :link reftype=hd res=10600.:hp7.Dim:ehp7.:elink. statement, :hp1.dialogName:ehp1. is used to identify the dialog 
  432. definition&per.:lm margin=1.
  433. :li.
  434. :esl.
  435. :h2 x=right y=bottom width=50% height=100% res=10120.Button
  436. :i1 id=ix16.Button
  437. :i2 refid=ix9.Button
  438. :i2 refid=ix14.Button
  439. :i1 id=ix17.Buttons
  440. :i2 refid=ix17.Button
  441. :sl compact.
  442. :hp2.Button Statement:ehp2.
  443. :li.
  444. :li.
  445. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Button :ehp2.:hp1.x, y, dx, dy, text$:ehp1.:lm margin=1.
  446. :li.
  447. :li.
  448. :hp2.Comments:ehp2.:lm margin=14.The :hp2.Button :ehp2.statement is used to define a custom push button&per.  
  449. (This allows the use of push buttons other than OK and CANCEL&per.)  It is used in 
  450. conjunction with the :link reftype=hd res=10125.:hp7.ButtonGroup:ehp7.:elink. Statement&per.:lm margin=1.
  451. :li.
  452. :lm margin=14.The :hp2.Button :ehp2.statement  can only be used between a :link reftype=hd res=10115.:hp7.Begin Dialog:ehp7.:elink. and 
  453. an :hp2.End Dialog :ehp2.statement&per.:lm margin=1.
  454. :li.
  455. :lm margin=14.The :hp1.x:ehp1. and :hp1.y:ehp1. arguments set the position of the button relative to 
  456. the upper left corner of the dialog box&per.  :hp1.Dx:ehp1. and :hp1.dy :ehp1.set the width and height of 
  457. the button&per.  A:hp1. dy:ehp1. value of 14 typically accommodates text in the system font&per. :lm margin=1.
  458. :li.
  459. :lm margin=14.The:hp1. text$:ehp1. field contains message that will be contained in the 
  460. push button&per.  If the width of this string is greater than :hp1.dx:ehp1., trailing 
  461. characters will be truncated&per.  :lm margin=1.
  462. :li.
  463. :esl.
  464. :h2 x=right y=bottom width=50% height=100% res=10125.ButtonGroup
  465. :i1 id=ix18.ButtonGroup
  466. :i2 refid=ix17.ButtonGroup
  467. :i2 refid=ix9.ButtonGroup
  468. :i2 refid=ix14.ButtonGroup
  469. :sl compact.
  470. :hp2.ButtonGroup Statement:ehp2.
  471. :li.
  472. :li.
  473. :hp2.Syntax:ehp2.:lm margin=14.:hp2.ButtonGroup  :ehp2.:hp1.&per.field:ehp1.:lm margin=1.
  474. :li.
  475. :li.
  476. :hp2.Comments:ehp2.:lm margin=14.The :hp2.ButtonGroup  :ehp2.statement begins definition of the buttons when 
  477. custom buttons are to be used&per.  :hp2.ButtonGroup  :ehp2.establishes the dialog-record 
  478. field that will contain the user's selection&per.  If :hp2.ButtonGroup  :ehp2.is used, it must 
  479. appear before any :link reftype=hd res=10120.:hp7.Button:ehp7.:elink. statement which creates a pushbutton&per.  Only one :hp2.
  480. ButtonGroup  :ehp2.statement is allowed within a dialog box definition&per.:lm margin=1.
  481. :li.
  482. :lm margin=14.The :hp2.ButtonGroup  :ehp2.statement  can only be used between a :hp7.Begin:ehp7.:hp5. :ehp5.:link reftype=hd res=10115.:hp7.Dialog:ehp7.:elink.
  483.  and an :hp2.End Dialog:ehp2. statement&per.:lm margin=1.
  484. :li.
  485. :esl.
  486. :h2 x=right y=bottom width=50% height=100% res=10200.Call
  487. :i1 id=ix19.Call
  488. :i2 refid=ix19.Call
  489. :i1 id=ix20.Sub
  490. :i2 refid=ix20.Call
  491. :i2 refid=ix9.Call
  492. :i1 id=ix21.Procedures
  493. :i2 refid=ix21.Call
  494. :i1 id=ix22.ByVal
  495. :i2 refid=ix22.Call
  496. :i1 id=ix23.Any
  497. :i2 refid=ix23.Call
  498. :sl compact.
  499. :hp2.Call Statement:ehp2.
  500. :li.
  501. :li.
  502. :hp2.Syntax A:ehp2.:lm margin=14.:hp2.Call :ehp2.:hp1.subprogram-name :ehp1.[:hp2. ( :ehp2.:hp1.argumentlist :ehp1.:hp2.) :ehp2.]:lm margin=1.
  503. :li.
  504. :li.
  505. :hp2.Syntax B:ehp2.:lm margin=14.:hp1.subprogram-name  argumentlist:ehp1.:lm margin=1.
  506. :li.
  507. :li.
  508. :hp2.Syntax C :ehp2.:lm margin=14.:hp2.Call :ehp2.:hp1.app-dialog :ehp1.:hp2.( :ehp2.:hp1.recordName :ehp1.:hp2.):ehp2.:lm margin=1.
  509. :li.
  510. :li.
  511. :hp2.Syntax D :ehp2.:lm margin=14.:hp1.App-dialog :ehp1.{ :hp1.recordName:ehp1. | :hp1.dotList:ehp1. }:lm margin=1.
  512. :li.
  513. :li.
  514. :hp2.Comments:ehp2.:lm margin=14.The Call statement is used to transfer control to a :link reftype=fn refid=subprogram.:hp5.subprogram:ehp5.:elink. 
  515. procedure or application-defined dialog box&per.  The Call statement can be used to 
  516. call a subprogram written in BASIC or to call C procedures in a DLL&per.  These C 
  517. procedures must be described in a :link reftype=hd res=10500.:hp7.Declare:ehp7.:elink. statement or be implicit in the 
  518. application&per.:lm margin=1.
  519. :li.
  520. :lm margin=14.The arguments to the subprogram must match the parameters as 
  521. specified in the definition of the subprogram&per.  The arguments may be either 
  522. variables or expressions&per.  :lm margin=1.
  523. :li.
  524. :lm margin=14.Arguments are passed by :link reftype=fn refid=callByReference.:hp5.reference:ehp5.:elink. to procedures written in BASIC&per.  
  525. If you pass a variable to a procedure which modifies its corresponding formal 
  526. parameter, and you do not wish to have your variable modified, enclose the 
  527. variable in parentheses in the Call statement&per.  This will tell BASIC to pass a 
  528. copy of the variable&per.  Note that this will be less efficient, and should not be 
  529. done unless necessary&per.:lm margin=1.
  530. :li.
  531. :lm margin=14.When a variable is passed to a procedure which expects its 
  532. argument by reference, the variable must match the exact type of the formal 
  533. parameter of the function&per.  (This restriction does not apply to expressions&per.) :lm margin=1.
  534. :li.
  535. :lm margin=14.Similarly to subprogram invocation, functions associated with 
  536. application-defined dialog boxes can be invoked using :hp2.Call :ehp2.syntaxes listed as C 
  537. and D above&per.  In Syntax C, the name inside the parentheses must be a variable 
  538. previously :hp2.Dim:ehp2.'ed as an application-defined dialog record&per.  In Syntax D, the 
  539. dialog box name can be followed by either a dialog record variable or a 
  540. comma-separated list of dialog box fields settings, e&per.g&per.&colon.:lm margin=1.
  541. :li.
  542. :lm margin=14.:lm margin=14.SearchFind &per.SearchFor="abc", &per.Forward=1:lm margin=1.
  543. :li.
  544. :lm margin=14.When calling an external DLL procedure, arguments can be passed by 
  545. value rather than by reference&per.  This is specified either in the :link reftype=hd res=10500.:hp7.Declare:ehp7.:elink. 
  546. statement, the :hp2.Call:ehp2. itself, or both, using the :hp2.ByVal:ehp2. keyword&per.   If :hp2.ByVal:ehp2. is 
  547. specified in the declaration, then the :hp2.ByVal:ehp2. keyword is optional in the call; 
  548. if present, it must precede the value&per.  If :hp2.ByVal:ehp2. was not specified in the 
  549. declaration, it is illegal in the call unless the datatype specified in the 
  550. declaration was :hp2.Any:ehp2.&per.  Specifying :hp2.ByVa:ehp2.:hp2.l:ehp2. causes the parameter's value to be 
  551. placed on the stack, rather than a far reference to it&per.:lm margin=1.
  552. :li.
  553. :esl.
  554. :h2 x=right y=bottom width=50% height=100% res=10205.CancelButton
  555. :i1 id=ix24.CancelButton
  556. :i2 refid=ix17.CancelButton
  557. :i2 refid=ix9.CancelButton
  558. :i2 refid=ix14.CancelButton
  559. :sl compact.
  560. :hp2.CancelButton Statement:ehp2.
  561. :li.
  562. :li.
  563. :hp2.Syntax:ehp2.:lm margin=14.:hp2.CancelButton :ehp2.:hp1.x, y,:ehp1. :hp1.dx, dy:ehp1.:lm margin=1.
  564. :li.
  565. :li.
  566. :hp2.Comments:ehp2.:lm margin=14.The :hp2.CancelButton :ehp2.statement determines the position and size of a 
  567. cancel button&per.:lm margin=1.
  568. :li.
  569. :lm margin=14.The :hp2.CancelButton :ehp2.statement  can only be used between a :link reftype=hd res=10115.:hp7.Begin Dialog:ehp7.:elink.
  570.  and an:hp2. End Dialog:ehp2. statement&per.:lm margin=1.
  571. :li.
  572. :lm margin=14.The :hp1.x:ehp1. and :hp1.y:ehp1. arguments set the position of the cancel button 
  573. relative to the upper left corner of the dialog box&per.  :hp1.Dx:ehp1. and :hp1.dy :ehp1.set the width 
  574. and height of the button&per.  A:hp1. dy:ehp1. value of 14 can usually accommodate text in the 
  575. system font&per.  :lm margin=1.
  576. :li.
  577. :lm margin=14.If the CancelButton is pushed at runtime, the dialog box will be 
  578. removed from the screen and an Error 102 will be triggered&per.:lm margin=1.
  579. :li.
  580. :esl.
  581. :h2 x=right y=bottom width=50% height=100% res=10208.Caption
  582. :i1 id=ix25.Caption
  583. :i2 refid=ix9.Caption
  584. :i2 refid=ix14.Caption
  585. :sl compact.
  586. :hp2.Caption Statement:ehp2.
  587. :li.
  588. :li.
  589. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Caption :ehp2.:hp1.text:ehp1.:lm margin=1.
  590. :li.
  591. :li.
  592. :hp2.Comments:ehp2.:lm margin=14.The :hp2.Caption :ehp2.statement defines the text to be used as the title of 
  593. a dialog-box&per.:lm margin=1.
  594. :li.
  595. :lm margin=14.The :hp2.Caption :ehp2.statement  can only be used between a :link reftype=hd res=10115.:hp7.Begin Dialog:ehp7.:elink. and 
  596. an:hp2. End Dialog:ehp2. statement&per.:lm margin=1.
  597. :li.
  598. :lm margin=14.If no :hp2.Caption:ehp2. statement is specified for the dialog box, a default 
  599. caption will be used&per.:lm margin=1.
  600. :li.
  601. :esl.
  602. :h2 x=right y=bottom width=50% height=100% res=10209.CDbl
  603. :i1 id=ix26.CDbl
  604. :i2 refid=ix3.CDbl
  605. :i2 refid=ix4.CDbl
  606. :i2 refid=ix7.CDbl
  607. :sl compact.
  608. :hp2.CDbl Function:ehp2.
  609. :li.
  610. :li.
  611. :hp2.Syntax:ehp2.:lm margin=14.:hp2.CDbl (:ehp2.:hp1. numeric-expression :ehp1.:hp2.):ehp2.:lm margin=1.
  612. :li.
  613. :li.
  614. :hp2.Returns:ehp2.:lm margin=14.The :hp2.CDbl:ehp2. function converts a :hp1.numeric-expression:ehp1. to 
  615. double-precision floating point&per.:lm margin=1.
  616. :li.
  617. :li.
  618. :hp2.Comments:ehp2.:lm margin=14.The argument given is any :hp1.numeric -expression:ehp1.&per. :lm margin=1.
  619. :li.
  620. :lm margin=14. :hp2.CDbl:ehp2. generates the same result as you would get by assigning the :hp1.
  621. numeric -expression:ehp1. to a :hp2.Double:ehp2.  variable&per.To convert a numeric expression to a 
  622. different data type, see :link reftype=hd res=10227.:hp7.CInt:ehp7.:elink., :link reftype=hd res=10229.:hp7.CLng:ehp7.:elink. and :link reftype=hd res=10445.:hp7.CSng:ehp7.:elink.&per.:lm margin=1.
  623. :li.
  624. :esl.
  625. :h2 x=right y=bottom width=50% height=100% res=10210.ChDir
  626. :i1 id=ix27.ChDir
  627. :i2 refid=ix9.ChDir
  628. :i1 id=ix28.Directories
  629. :i2 refid=ix28.ChDir
  630. :i1 id=ix29.Files
  631. :i2 refid=ix29.ChDir
  632. :sl compact.
  633. :hp2.ChDir Statement:ehp2.
  634. :li.
  635. :li.
  636. :hp2.Syntax:ehp2.:lm margin=14.:hp2.ChDir :ehp2.:hp1.pathname$:ehp1.:lm margin=1.
  637. :li.
  638. :li.
  639. :hp2.Comments:ehp2.:lm margin=14.The :hp2.ChDir:ehp2.:hp2. :ehp2.statement changes the default directory for the 
  640. specified drive&per.  It does not change the default drive&per.  (To change the default 
  641. drive, use :link reftype=hd res=10220.:hp7.ChDrive:ehp7.:elink.&per.):lm margin=1.
  642. :li.
  643. :lm margin=14.:hp1.Pathname$ :ehp1.is a string expression identifying the new default 
  644. directory&per.  The syntax for :hp1.pathname$:ehp1. is&colon.:lm margin=1.
  645. :li.
  646. :lm margin=14.:lm margin=14.[:hp1.drive:ehp1.&colon.] [\] :hp1.directory:ehp1. [\:hp1.directory:ehp1.]:lm margin=1.
  647. :li.
  648. :lm margin=14.The drive argument is optional&per.  If omitted, :hp2.ChDir :ehp2.changes the 
  649. default directory on the current drive&per.:lm margin=1.
  650. :li.
  651. :esl.
  652. :h2 x=right y=bottom width=50% height=100% res=10220.ChDrive
  653. :i1 id=ix30.ChDrive
  654. :i2 refid=ix9.ChDrive
  655. :i2 refid=ix28.ChDrive
  656. :i2 refid=ix29.ChDrive
  657. :sl compact.
  658. :hp2.ChDrive Statement:ehp2.
  659. :li.
  660. :li.
  661. :hp2.Syntax:ehp2.:lm margin=14.:hp2.ChDrive :ehp2.:hp1.drivename$:ehp1.:lm margin=1.
  662. :li.
  663. :li.
  664. :hp2.Comments:ehp2.:lm margin=14.The :hp2.ChDrive :ehp2.statement changes the default drive&per.:lm margin=1.
  665. :li.
  666. :lm margin=14.:hp1.Drivename$ :ehp1.is a string expression designating the new default 
  667. drive&per.  This drive must exist, and must be within the range specified in the 
  668. CONFIG&per.SYS file&per.  If a null argument (" ") is supplied, the default drive 
  669. remains the same&per.  If the:hp1. drivename$ :ehp1.argument is a string, :hp2.ChDrive :ehp2.uses the 
  670. first letter only&per.  If the argument is omitted, an error message is produced&per.  
  671. (To change the current directory on a drive, use :link reftype=hd res=10210.:hp7.ChDir:ehp7.:elink.&per.):lm margin=1.
  672. :li.
  673. :esl.
  674. :h2 x=right y=bottom width=50% height=100% res=10222.CheckBox
  675. :i1 id=ix31.CheckBox
  676. :i2 refid=ix9.CheckBox
  677. :i2 refid=ix14.CheckBox
  678. :sl compact.
  679. :hp2.CheckBox Statement:ehp2.
  680. :li.
  681. :li.
  682. :hp2.Syntax:ehp2.:lm margin=14.:hp2.CheckBox :ehp2.:hp1.x, y,:ehp1. :hp1.dx, dy, text$, &per.field:ehp1.:lm margin=1.
  683. :li.
  684. :li.
  685. :hp2.Co:ehp2.:hp2.mments:ehp2.:lm margin=14.The :hp2.CheckBox :ehp2.statement  can only be used between a :link reftype=hd res=10115.:hp7.Begin Dialog:ehp7.:elink. 
  686. and an :hp2.End Dialog:ehp2. statement&per.:lm margin=1.
  687. :li.
  688. :lm margin=14.The :hp1.x:ehp1. and :hp1.y:ehp1. arguments give the coordinates that position the check 
  689. box&per.  These coordinates designate the position of the upper left corner of the 
  690. check box, relative to the upper left corner of the dialog box&per.  The :hp1.x:ehp1. argument 
  691. is measured in 1/4 system-font character-width units&per.  The :hp1.y :ehp1.argument is 
  692. measured in 1/8 system-font character-height units&per. (See :link reftype=hd res=10115.:hp7.Begin Dialog:ehp7.:elink.&per.) :lm margin=1.
  693. :li.
  694. :lm margin=14.The:hp1. dx :ehp1.argument is the combined width of the check box and the 
  695. text$ field&per. Because proportional spacing is used, the width will vary with the 
  696. characters used&per. To approximate the width, multiply the number of characters in 
  697. the:hp1. text$:ehp1. field (including blanks and punctuation) by 4 and add 12 for the 
  698. checkbox&per.  :lm margin=1.
  699. :li.
  700. :lm margin=14.The :hp1.dy:ehp1. argument is the height of the :hp1.text$:ehp1. field&per.  A :hp1.dy:ehp1. value of 
  701. 12is standard, and should cover typical default fonts&per.  If larger fonts are 
  702. used, the value should be increased&per.  As the :hp1.dy:ehp1. number grows, the checkbox and 
  703. the accompanying text will move downward within the dialog box&per.:lm margin=1.
  704. :li.
  705. :lm margin=14.The:hp1. text$:ehp1. field contains the title shown to the right of the check 
  706. box&per.  If the width of this string is greater than dx, trailing characters will 
  707. be truncated&per.  If you wish to include underlined characters so that the check 
  708. box selection can be made from the keyboard, the character must be preceded 
  709. with an ampersand (&.)&per.:lm margin=1.
  710. :li.
  711. :lm margin=14.The :hp1.&per.field :ehp1.argument is the name of the dialog-record field that 
  712. will hold the current check box setting&per.  If its value is 0, the box is 
  713. unchecked; if its value is -1 the box will be greyed; if its value is 1, the 
  714. box will be checked&per.  SBL will treat any other value of :hp1.&per.field :ehp1.the same as a 1&per.:lm margin=1.
  715. :li.
  716. :esl.
  717. :h2 x=right y=bottom width=50% height=100% res=10225.Chr$
  718. :i1 id=ix32.Chr$
  719. :i2 refid=ix3.Chr$
  720. :i2 refid=ix6.Chr$
  721. :i2 refid=ix4.Chr$
  722. :i2 refid=ix7.Chr$
  723. :sl compact.
  724. :hp2.Chr$ Function:ehp2.
  725. :li.
  726. :li.
  727. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Chr$:ehp2.(:hp1.code%:ehp1.):lm margin=1.
  728. :li.
  729. :li.
  730. :hp2.Returns:ehp2.:lm margin=14.The :hp2.Chr$:ehp2. function returns the one-character string corresponding 
  731. to an ANSI code&per.   (See :link reftype=hd res=10100.:hp7.Asc:ehp7.:elink.)&per.:lm margin=1.
  732. :li.
  733. :li.
  734. :hp2.Comments:ehp2.:lm margin=14.:hp1.Code%:ehp1. is an integer between 0 and 255&per. :lm margin=1.
  735. :li.
  736. :esl.
  737. :h2 x=right y=bottom width=50% height=100% res=10227.CInt
  738. :i1 id=ix33.CInt
  739. :i2 refid=ix3.CInt
  740. :i2 refid=ix4.CInt
  741. :i2 refid=ix7.CInt
  742. :sl compact.
  743. :hp2.CInt Function:ehp2.
  744. :li.
  745. :li.
  746. :hp2.Syntax:ehp2.:lm margin=14.:hp2.CInt (:ehp2.:hp1. numeric-expression :ehp1.:hp2.):ehp2.:lm margin=1.
  747. :li.
  748. :li.
  749. :hp2.Returns:ehp2.:lm margin=14.The :hp2.CInt:ehp2. function converts a :hp1.numeric-expression:ehp1. to integer by 
  750. rounding&per.:lm margin=1.
  751. :li.
  752. :li.
  753. :hp2.Comments:ehp2.:lm margin=14.The argument given is any :hp1.numeric -expression:ehp1.&per.   After rounding, 
  754. the resulting number must be within the range of -32767 to 32767, or an error 
  755. will occur&per.:lm margin=1.
  756. :li.
  757. :lm margin=14. :hp2.CInt:ehp2. generates the same result as you would get by assigning the :hp1.
  758. numeric -expression:ehp1. to an :hp2.Integer:ehp2. variable&per.  The :link reftype=hd res=11310.:hp7.Int:ehp7.:elink. and :link reftype=hd res=10730.:hp7.Fix:ehp7.:elink. functions can also 
  759. be uset to convert a numeric  expression to an integer, but perform truncation&per. 
  760.  To convert a numeric expression to a different data type, see :link reftype=hd res=10209.:hp7.CDbl:ehp7.:elink., :link reftype=hd res=10229.:hp7.CLng:ehp7.:elink. and :link reftype=hd res=10445.:hp7.
  761. CSng:ehp7.:elink.&per.:lm margin=1.
  762. :li.
  763. :esl.
  764. :h2 x=right y=bottom width=50% height=100% res=10229.CLng
  765. :i1 id=ix34.CLng
  766. :i2 refid=ix3.CLng
  767. :i2 refid=ix4.CLng
  768. :i2 refid=ix7.CLng
  769. :sl compact.
  770. :hp2.CLng Function:ehp2.
  771. :li.
  772. :li.
  773. :hp2.Syntax:ehp2.:lm margin=14.:hp2.CLng (:ehp2.:hp1. numeric-expression :ehp1.:hp2.):ehp2.:lm margin=1.
  774. :li.
  775. :li.
  776. :hp2.Returns:ehp2.:lm margin=14.The :hp2.CLng:ehp2. function converts a :hp1.numeric-expression:ehp1. to long by 
  777. rounding&per.:lm margin=1.
  778. :li.
  779. :li.
  780. :hp2.Comments:ehp2.:lm margin=14.The argument given is any :hp1.numeric -expression:ehp1.&per.   After rounding, 
  781. the resulting number must be within the range of  -2,147,483,648 to 
  782. 2,147,483,647, or an error will occur&per.:lm margin=1.
  783. :li.
  784. :lm margin=14. :hp2.CLng:ehp2. generates the same result as you would get by assigning the :hp1.
  785. numeric -expression:ehp1. to a :hp2.Long:ehp2. variable&per.   To convert a numeric expression to a 
  786. different data type, see :link reftype=hd res=10209.:hp7.CDbl:ehp7.:elink., :link reftype=hd res=10227.:hp7.CInt:ehp7.:elink. and :link reftype=hd res=10445.:hp7.CSng:ehp7.:elink.&per.:lm margin=1.
  787. :li.
  788. :esl.
  789. :h2 x=right y=bottom width=50% height=100% res=10230.Close
  790. :i1 id=ix35.Close
  791. :i2 refid=ix35.Close
  792. :i2 refid=ix9.Close
  793. :i2 refid=ix29.Close
  794. :sl compact.
  795. :hp2.Close Statement:ehp2.
  796. :li.
  797. :li.
  798. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Close :ehp2.[ [:hp1.#:ehp1.] :hp1.filenumber% :ehp1. [ , [ # ] :hp1.filenumber% :ehp1.&per.&per.&per. ]]:lm margin=1.
  799. :li.
  800. :li.
  801. :hp2.Comments:ehp2.:lm margin=14.The :hp2.Close :ehp2.Statement closes a file, concluding input/output to that 
  802. file&per.:lm margin=1.
  803. :li.
  804. :lm margin=14.:hp1.Filenumber% :ehp1.is an integer expression identifying the file to 
  805. close&per.  It is the number used in the :link reftype=hd res=12070.:hp7.Open:ehp7.:elink. statement for the file&per.  If this 
  806. argument is omitted, all open files  are closed&per.  Once a :hp2.Close :ehp2.statement is 
  807. executed, the association of a file with :hp1.filenumber% :ehp1.is ended, and the file can 
  808. be reopened with the same or different file number&per.:lm margin=1.
  809. :li.
  810. :lm margin=14.When the :hp2.Close :ehp2.Statement is used, the final output buffer is 
  811. written to the operating system buffer for that file&per.  :hp2.Close :ehp2.frees all buffer 
  812. space associated with the closed file&per.  Use the :link reftype=hd res=12090.:hp7.Reset:ehp7.:elink. statement so that the 
  813. operating system will flush its buffers to disk&per.:lm margin=1.
  814. :li.
  815. :esl.
  816. :h2 x=right y=bottom width=50% height=100% res=10250.ComboBox
  817. :i1 id=ix36.ComboBox
  818. :i2 refid=ix9.ComboBox
  819. :i2 refid=ix14.ComboBox
  820. :sl compact.
  821. :hp2.ComboBox Statement:ehp2.
  822. :li.
  823. :li.
  824. :hp2.Syntax:ehp2.:lm margin=14.:hp2.ComboBox :ehp2.:hp1.x, y,:ehp1. :hp1.dx, dy, text$, &per.field:ehp1.:lm margin=1.
  825. :li.
  826. :li.
  827. :hp2.Comments:ehp2.:lm margin=14.The :hp2.ComboBox :ehp2.statement is used to create a combination text box 
  828. and list box&per.   :lm margin=1.
  829. :li.
  830. :lm margin=14.The :hp2.ComboBox :ehp2.statement  can only be used between a :link reftype=hd res=10115.:hp7.Begin Dialog:ehp7.:elink. 
  831. and an :hp2.End Dialog :ehp2.statement&per.:lm margin=1.
  832. :li.
  833. :lm margin=14.The :hp1.x:ehp1. and :hp1.y:ehp1. arguments give the coordinates that position the upper 
  834. left corner of the list box, relative to the upper left corner of the dialog 
  835. box&per.  The :hp1.x:ehp1. argument is measured in 1/4 system-font character-width units&per.  The :hp1.
  836. y :ehp1.argument is measured in 1/8 system-font character-width units&per. (See :link reftype=hd res=10115.:hp7.Begin 
  837. Dialog:ehp7.:elink.&per.) :lm margin=1.
  838. :li.
  839. :lm margin=14.The:hp1. dx :ehp1.and:hp1. dy :ehp1.arguments specify the width and height of the combo 
  840. box in which the user enters or selects text&per.:lm margin=1.
  841. :li.
  842. :lm margin=14.The:hp1. text$:ehp1. field specifies the name of the string containing the 
  843. list variables&per.:lm margin=1.
  844. :li.
  845. :lm margin=14.The :hp1.&per.field :ehp1.argument is the name of the dialog-record field that 
  846. will hold the text string entered in the text box or chosen from the list box&per.  
  847. The string in the text box will be recorded in the field designated by the :hp1.
  848. &per.field:ehp1. argument when the OK button (or any pushbutton other than CANCEL) is 
  849. pushed&per.:lm margin=1.
  850. :li.
  851. :esl.
  852. :h2 x=right y=bottom width=50% height=100% res=10400.Command$
  853. :i1 id=ix37.Command$
  854. :i2 refid=ix3.Command$
  855. :sl compact.
  856. :hp2.Command$ Function:ehp2.
  857. :li.
  858. :li.
  859. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Command$:ehp2.:lm margin=1.
  860. :li.
  861. :li.
  862. :hp2.Returns:ehp2.:lm margin=14.The :hp2.Command$:ehp2. function returns a string containing the command line 
  863. specified when the MAIN subprogram was invoked&per.:lm margin=1.
  864. :li.
  865. :li.
  866. :hp2.C:ehp2.:hp2.omments:ehp2.:lm margin=14.After the MAIN subprogram returns, further calls to the :hp2.Command$:ehp2. 
  867. function will yield an empty string&per.  This function may not be supported in 
  868. some implementations of SBL&per.:lm margin=1.
  869. :li.
  870. :esl.
  871. :h2 x=right y=bottom width=50% height=100% res=10425.Const
  872. :i1 id=ix38.Const
  873. :i1 id=ix39.Variables
  874. :i2 refid=ix39.Const
  875. :i2 refid=ix9.Const
  876. :i1 id=ix40.String
  877. :i2 refid=ix40.Const
  878. :i1 id=ix41.Integer
  879. :i2 refid=ix41.Const
  880. :i1 id=ix42.Long
  881. :i2 refid=ix42.Const
  882. :i1 id=ix43.Single
  883. :i2 refid=ix43.Const
  884. :i1 id=ix44.Double
  885. :i2 refid=ix44.Const
  886. :i1 id=ix45.Global
  887. :i2 refid=ix45.Const
  888. :sl compact.
  889. :hp2.Const Statement:ehp2.
  890. :li.
  891. :li.
  892. :hp2.Syntax:ehp2.:lm margin=14.:hp2.[Global] Const :ehp2.:hp1.constantName:ehp1. = :hp1.expression:ehp1. [,:hp1.constantName :ehp1.= :hp1.
  893. expression:ehp1.:hp2. :ehp2.]:hp2.&per.&per.&per.:ehp2.:lm margin=1.
  894. :li.
  895. :li.
  896. :hp2.Comments:ehp2.:lm margin=14.You use the :hp2.Const:ehp2. statement to declare symbolic constants for use 
  897. in a BASIC program&per.  BASIC is a strongly typed language&per.  The available :link reftype=hd res=20100.:hp5.data 
  898. types:ehp5.:elink. for constants are numbers and strings&per.:lm margin=1.
  899. :li.
  900. :lm margin=14.The type of the constant may be specified by using a :link reftype=fn refid=typeCharacter.:hp5.type character:ehp5.:elink.
  901.  as a suffix to the :hp1.constantName:ehp1.&per.  If no type character is specified, the type 
  902. of the :hp1.constantName:ehp1. will be derived from the type of the expression&per.:lm margin=1.
  903. :li.
  904. :lm margin=14.If :hp2.Global:ehp2. is specified, the constant is validated at module load 
  905. time; if the constant has already been added to the run-time global area, the 
  906. constant's type and value are compared to the previous definition, and the load 
  907. will fail if a mismatch is found&per.  This is useful as a mechanism for detecting 
  908. version mismatches between modules&per.:lm margin=1.
  909. :li.
  910. :esl.
  911. :h2 x=right y=bottom width=50% height=100% res=10437.Cos
  912. :i1 id=ix46.Cos
  913. :i2 refid=ix3.Cos
  914. :i2 refid=ix11.Cos
  915. :sl compact.
  916. :hp2.Cos Function:ehp2.
  917. :li.
  918. :li.
  919. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Cos:ehp2.( :hp1.angle :ehp1.):lm margin=1.
  920. :li.
  921. :li.
  922. :hp2.Returns:ehp2.:lm margin=14.The :hp2.Cos:ehp2. function returns the cosine of an angle&per.  The return value 
  923. will be between -1 and 1&per.  The return value is single-precision if the angle is 
  924. an integer or single-precision value, double precision for a long or 
  925. double-precision value&per.:lm margin=1.
  926. :li.
  927. :li.
  928. :hp2.Comments:ehp2.:lm margin=14.The :hp1.angle:ehp1. is specified in radians, and can be either positive or 
  929. negative&per.:lm margin=1.
  930. :li.
  931. :esl.
  932. :h2 x=right y=bottom width=50% height=100% res=10445.CSng
  933. :i1 id=ix47.CSng
  934. :i2 refid=ix3.CSng
  935. :i2 refid=ix4.CSng
  936. :i2 refid=ix7.CSng
  937. :sl compact.
  938. :hp2.CSng Function:ehp2.
  939. :li.
  940. :li.
  941. :hp2.Syntax:ehp2.:lm margin=14.:hp2.CSng (:ehp2.:hp1. numeric-expression :ehp1.:hp2.):ehp2.:lm margin=1.
  942. :li.
  943. :li.
  944. :hp2.Returns:ehp2.:lm margin=14.The :hp2.CSng:ehp2. function converts a :hp1.numeric-expression:ehp1. to 
  945. single-precision floating point&per.:lm margin=1.
  946. :li.
  947. :li.
  948. :hp2.Comments:ehp2.:lm margin=14.The argument given is any :hp1.numeric -expression:ehp1.&per.   The :hp1.
  949. numeric-expression:ehp1. must have a value within the range allowed for the :hp2.Single:ehp2. 
  950. data type, or an error will occur&per. :lm margin=1.
  951. :li.
  952. :lm margin=14. :hp2.CSng:ehp2. generates the same result as you would get by assigning the :hp1.
  953. numeric -expression:ehp1. to a :hp2.Single:ehp2.  variable&per.  To convert a numeric expression to 
  954. a different data type, see :link reftype=hd res=10209.:hp7.CDbl:ehp7.:elink., :link reftype=hd res=10227.:hp7.CInt:ehp7.:elink. and :link reftype=hd res=10229.:hp7.CLng:ehp7.:elink.&per.:lm margin=1.
  955. :li.
  956. :esl.
  957. :h2 x=right y=bottom width=50% height=100% res=10450.CStrings
  958. :i1 id=ix48.$CStrings
  959. :i2 refid=ix48.CStrings
  960. :i1 id=ix49.NoCStrings
  961. :i2 refid=ix49.CStrings
  962. :i1 id=ix50.Metacommands
  963. :i2 refid=ix50.CStrings
  964. :i2 refid=ix9.CStrings
  965. :i1 id=ix51.Comments
  966. :i2 refid=ix51.CStrings
  967. :sl compact.
  968. :hp2.$CStrings Metacommand:ehp2.
  969. :li.
  970. :li.
  971. :hp2.Syntax:ehp2.:lm margin=14.:hp2.'$CSTRINGS:ehp2.:lm margin=1.
  972. :li.
  973. :li.
  974. :hp2.Comments:ehp2.:lm margin=14.The :hp2.$CSt:ehp2.:hp2.rings :ehp2.Metacommand tells the compiler to treat a backslash 
  975. character inside a string (\) as an escape character&per.  This treatment is based 
  976. on the 'C' language&per.:lm margin=1.
  977. :li.
  978. :lm margin=14.The supported special characters are&colon.:lm margin=1.
  979. :li.
  980. :li.
  981. :lm margin=21.Newline (Linefeed):lm margin=41.\n:lm margin=21.:lm margin=1.
  982. :li.
  983. :lm margin=21.Horizontal Tab:lm margin=41.\t:lm margin=21.:lm margin=1.
  984. :li.
  985. :lm margin=21.Vertical Tab:lm margin=41.\v:lm margin=21.:lm margin=1.
  986. :li.
  987. :lm margin=21.Backspace:lm margin=41.\b:lm margin=21.:lm margin=1.
  988. :li.
  989. :lm margin=21.Carriage Return:lm margin=41.\r:lm margin=21.:lm margin=1.
  990. :li.
  991. :lm margin=21.Formfeed:lm margin=41.\f:lm margin=21.:lm margin=1.
  992. :li.
  993. :lm margin=21.Backslash:lm margin=41.\\:lm margin=21.:lm margin=1.
  994. :li.
  995. :lm margin=21.Single Quote:lm margin=41.\':lm margin=21.:lm margin=1.
  996. :li.
  997. :lm margin=21.Double Quote:lm margin=41.\":lm margin=21.:lm margin=1.
  998. :li.
  999. :lm margin=21.Null Character:lm margin=41.\0:lm margin=21.:lm margin=1.
  1000. :li.
  1001. :lm margin=14.The instruction "Hello\r World" is the equivalent of "Hello" + 
  1002. Chr$(13)+"World"&per.:lm margin=1.
  1003. :li.
  1004. :li.
  1005. :lm margin=14.In addition, any character can be represented as a 3 digit octal 
  1006. code or a 3 digit hexadecimal code&colon.:lm margin=1.
  1007. :li.
  1008. :li.
  1009. :lm margin=21.Octal Code:lm margin=41.\ddd:lm margin=21.:lm margin=1.
  1010. :li.
  1011. :lm margin=21.Hexadecimal Code:lm margin=41.\xddd:lm margin=21.:lm margin=1.
  1012. :li.
  1013. :lm margin=14.For both hexadecimal and octal, fewer than 3 characters can be 
  1014. used to specify the code as long as the subsequent character is not a valid 
  1015. (hex or octal) character&per.:lm margin=1.
  1016. :li.
  1017. :lm margin=14.To tell the compiler to return to the default string processing 
  1018. mode, where the backslash character has no special meaning, use the :hp2.$:ehp2.:link reftype=hd res=12050.:hp7.NoCStrings:ehp7.:elink. 
  1019. Metacommand&per.:lm margin=1.
  1020. :li.
  1021. :esl.
  1022. :h2 x=right y=bottom width=50% height=100% res=10455.CurDir$
  1023. :i1 id=ix52.CurDir$
  1024. :i2 refid=ix3.CurDir$
  1025. :i2 refid=ix28.CurDir$
  1026. :i2 refid=ix29.CurDir$
  1027. :sl compact.
  1028. :hp2.CurDir$ Function:ehp2.
  1029. :li.
  1030. :li.
  1031. :hp2.Syntax:ehp2.:lm margin=14.:hp2.CurDir$ :ehp2.[ :hp2.(:ehp2.:hp1.drivename$:ehp1.:hp2.):ehp2. ]:lm margin=1.
  1032. :li.
  1033. :li.
  1034. :hp2.Returns:ehp2.:lm margin=14.The :hp2.CurDir$:ehp2. function returns the path (including the drive letter) 
  1035. that is current default directory for the specified drive&per. :lm margin=1.
  1036. :li.
  1037. :li.
  1038. :hp2.Comments:ehp2.:lm margin=14.:hp1.Drivename$ :ehp1.is a string expression identifying the drive to return 
  1039. the default directory of&per.  This drive must exist, and must be within the range 
  1040. specified in the CONFIG&per.SYS file&per.  If a null argument (" ") is supplied, or if 
  1041. no :hp1.drivename:ehp1. is indicated, the path for the default drive is returned&per. :lm margin=1.
  1042. :li.
  1043. :lm margin=14.To change the current drive, use :link reftype=hd res=10220.:hp7.ChDrive:ehp7.:elink.;  to change the current 
  1044. directory, use :link reftype=hd res=10210.:hp7.ChDir:ehp7.:elink.&per.:lm margin=1.
  1045. :li.
  1046. :esl.
  1047. :h2 x=right y=bottom width=50% height=100% res=10460.Date$
  1048. :i1 id=ix53.Date$
  1049. :i2 refid=ix6.Date$
  1050. :i2 refid=ix3.Date$
  1051. :sl compact.
  1052. :hp2.Date$ Function:ehp2.
  1053. :li.
  1054. :li.
  1055. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Date$:ehp2.:lm margin=1.
  1056. :li.
  1057. :li.
  1058. :hp2.Returns:ehp2.:lm margin=14.The :hp2.Date$:ehp2. function returns a string representing the current date&per.:lm margin=1.
  1059. :li.
  1060. :li.
  1061. :hp2.Comments:ehp2.:lm margin=14.The :hp2.Date$:ehp2. function returns a ten character string&per.:lm margin=1.
  1062. :li.
  1063. :esl.
  1064. :h2 x=right y=bottom width=50% height=100% res=10500.Declare
  1065. :i1 id=ix54.Declare
  1066. :i1 id=ix55.Function
  1067. :i2 refid=ix55.Declare
  1068. :i2 refid=ix20.Declare
  1069. :i2 refid=ix19.Declare
  1070. :i1 id=ix56.Lib
  1071. :i1 id=ix57.DLL
  1072. :i1 id=ix58.Alias
  1073. :i2 refid=ix9.Declare
  1074. :i2 refid=ix22.Declare
  1075. :i2 refid=ix23.Declare
  1076. :i2 refid=ix21.Declare
  1077. :i1 id=ix59.BasicLib
  1078. :sl compact.
  1079. :hp2.Declare Statement:ehp2.
  1080. :li.
  1081. :li.
  1082. :hp2.Syntax A:ehp2.:lm margin=14.:hp2.Declare Sub :ehp2.:hp1.name:ehp1.:hp2. [ :ehp2.:hp1.libSpecification:ehp1.:hp2. ]  [ ( :ehp2.:hp1.parameter :ehp1.:hp2.[ As:ehp2. :hp1.type:ehp1.:hp2. ] ) 
  1083. ]:ehp2.:lm margin=1.
  1084. :li.
  1085. :li.
  1086. :hp2.Syntax B:ehp2.:lm margin=14.:hp2.Declare Function :ehp2.:hp1.name:ehp1.:hp2. [ :ehp2.:hp1.libSpecification:ehp1.:hp2. ]  [ ( :ehp2.:hp1.parameter :ehp1.:hp2.[ As:ehp2. :hp1.type:ehp1.:hp2.
  1087.  ] ) ]:ehp2.:lm margin=1.
  1088. :li.
  1089. :li.
  1090. :hp2.Comments:ehp2.:lm margin=14.The :hp2.Declare :ehp2.statement has two uses - forward declaration of a 
  1091. procedure whose definition is to be found later in this module, and declaration 
  1092. of a procedure which is to be found in an external Windows DLL or external 
  1093. BASIC module&per.  :lm margin=1.
  1094. :li.
  1095. :lm margin=14.If the :hp1.libSpecification:ehp1. is of the format&colon.:lm margin=1.
  1096. :li.
  1097. :lm margin=21.:hp2.BasicLib:ehp2. :hp1.libName:ehp1.:lm margin=1.
  1098. :li.
  1099. :lm margin=14.the procedure is to be found in another BASIC module named :hp1.libName:ehp1.
  1100. &per.  In this case, the other module will be loaded on demand whenever the 
  1101. procedure is called&per.  SBL will not automatically unload modules which are 
  1102. loaded in this fashion&per.  SBL will detect errors of mis-declaration with very 
  1103. high (but not perfect) reliability&per.:lm margin=1.
  1104. :li.
  1105. :lm margin=14.If the :hp1.libSpecification:ehp1. is of the format&colon.:lm margin=1.
  1106. :li.
  1107. :lm margin=21.:hp2.Lib:ehp2. :hp1.libName:ehp1. :hp2.[ Alias:ehp2. :hp1.ordinal:ehp1. :hp2.]:ehp2.:lm margin=1.
  1108. :li.
  1109. :lm margin=14.the procedure is to be found in a Dynamic Link Library (DLL) named :hp1.
  1110. libName:ehp1.&per.     The :hp1.ordinal :ehp1.argument specifies the ordinal number of the procedure 
  1111. within the external DLL&per.  If the :hp1.ordinal :ehp1.is not specified, the DLL function 
  1112. will be accessed by name, which may cause the module to load more slowly&per.  It 
  1113. is recommended that the :hp1.ordinal :ehp1.be used whenever possible&per.:lm margin=1.
  1114. :li.
  1115. :lm margin=14.A forward declaration is needed only when a procedure in the 
  1116. current module is referenced before it is used&per.  In this case, the :hp2.BasicLib:ehp2., :hp2.Lib:ehp2.
  1117.  and :hp2.Alias :ehp2.clauses are not used&per.:lm margin=1.
  1118. :li.
  1119. :lm margin=14.A :link reftype=hd res=12500.:hp7.Sub:ehp7.:elink. procedure does not return a value&per.  :link reftype=hd res=10900.:hp7.Function:ehp7.:elink. returns a 
  1120. value, and can be used in an expression&per.  :link reftype=hd res=10900.:hp7.Function:ehp7.:elink. names must end with a type 
  1121. character&per.  This specifies the return value of the function&per.  The :hp1.name:ehp1. argument 
  1122. names the :link reftype=hd res=12500.:hp7.Sub:ehp7.:elink. or :link reftype=hd res=10900.:hp7.Function:ehp7.:elink. being declared&per.  :lm margin=1.
  1123. :li.
  1124. :lm margin=14.The :hp1.parameters :ehp1.are specified as a comma-separated list of 
  1125. parameter names&per.  The data type of a parameter may be specified by using a :link reftype=hd res=4.:hp5.type 
  1126. character:ehp5.:elink. or by using the :hp2.As:ehp2. clause&per.  Record parameters are declared by using 
  1127. an :hp2.As:ehp2. clause and a :hp1.type:ehp1. which has previously been defined using the :link reftype=hd res=12560.:hp7.Type:ehp7.:elink. 
  1128. statement&per.  Array parameters are indicated by using empty parentheses after the :hp1.
  1129. parameter:ehp1.&per.  Array dimensions are not specified in the :hp2.Declare:ehp2. statement&per.:lm margin=1.
  1130. :li.
  1131. :lm margin=14.External DLL procedures are called with the PASCAL calling 
  1132. convention (the actual arguments are pushed on the stack from left to right)&per.  
  1133. By default, the actual arguments are passed by far reference&per.  For external DLL 
  1134. procedures, there are two additional keywords, :hp2.ByVal:ehp2. and :hp2.Any:ehp2., that can be used 
  1135. in the parameter list&per.  :lm margin=1.
  1136. :li.
  1137. :lm margin=14.When :hp2.ByVal:ehp2. is used, it must be specified before the parameter it 
  1138. modifies&per.  When applied to numeric data types, :hp2.ByVal:ehp2. indicates that the 
  1139. parameter is passed by value, not by reference&per.  When applied to string 
  1140. parameters, :hp2.ByVal:ehp2. indicates that the string is passed by far pointer to the 
  1141. string data&per.  By default, strings are passed by far pointer to a string 
  1142. descriptor&per.:lm margin=1.
  1143. :li.
  1144. :lm margin=14.:hp2.Any:ehp2. can be used as a type specification, and permits a call to the 
  1145. procedure to pass a value of any datatype&per.  When :hp2.Any:ehp2. is used, type checking on 
  1146. the actual argument used in calls to the procedure is disabled (although other 
  1147. arguments not declared as type :hp2.Any:ehp2. are fully type-safe)&per.  The actual argument 
  1148. is passed by far reference, unless :hp2.ByVal:ehp2. is specified, in which case the actual 
  1149. value is placed on the stack (or a pointer to the string in the case of string 
  1150. data)&per.  :hp2.ByVal:ehp2. may also be used in the call It is the external DLL procedure's 
  1151. responsibility to determine the type and size of the passed-in value&per.:lm margin=1.
  1152. :li.
  1153. :lm margin=14.SBL supports two different behaviours when an empty string ("") is 
  1154. passed :hp2.ByVal:ehp2. to an external procedure&per.  The implementor of SBL can specify 
  1155. which behaviour by using the SBL API function :hp2.SblSetInstanceFlags:ehp2.&per.  In any 
  1156. specific implementation which uses SBL, one of these two behaviours should be 
  1157. used consistently&per.  We recommend the second behaviour, which is compatible with 
  1158. Microsoft's VB Language&per.  The following two paragraphs describe the two 
  1159. possible behaviours&per.  This paragraph, and one of the two following paragraphs 
  1160. should be removed for the final documentation&per.:lm margin=1.
  1161. :li.
  1162. :lm margin=14.When an empty string ("") is passed :hp2.ByVal:ehp2. to an external 
  1163. procedure,  the external procedure will receive a NULL pointer&per.  If you wish to 
  1164. send a valid pointer to an empty string, use :link reftype=hd res=10225.:hp7.Chr$(0):ehp7.:elink.&per. :lm margin=1.
  1165. :li.
  1166. :lm margin=14.When an empty string ("") is passed :hp2.ByVal:ehp2. to an external 
  1167. procedure,  the external procedure will receive a valid (non-NULL) pointer to a 
  1168. character of 0&per.  To send a NULL pointer, :hp2.Declare:ehp2. the procedure argument as :hp2.
  1169. ByVal As Any:ehp2., and call the procedure with an argument of :hp2.0&.:ehp2.&per.:lm margin=1.
  1170. :li.
  1171. :esl.
  1172. :h2 x=right y=bottom width=50% height=100% res=10525.DefType
  1173. :i1 id=ix60.Deftype
  1174. :i1 id=ix61.Type
  1175. :i2 refid=ix61.DefType
  1176. :i2 refid=ix9.DefType
  1177. :i2 refid=ix39.DefType
  1178. :sl compact.
  1179. :hp2.Def:ehp2.:hp3.type:ehp3.:hp2. Statement:ehp2.
  1180. :li.
  1181. :li.
  1182. :hp2.Syntax :ehp2.:lm margin=14.:hp2.DefInt:ehp2.:hp1. varTypeLetters:ehp1.
  1183. :li.
  1184. :hp2.DefLng:ehp2.:hp1. varTypeLetters:ehp1.
  1185. :li.
  1186. :hp2.DefSng:ehp2.:hp1. varTypeLetters:ehp1.
  1187. :li.
  1188. :hp2.DefDbl:ehp2.:hp1. varTypeLetters:ehp1.
  1189. :li.
  1190. :hp2.DefStr:ehp2.:hp1. varTypeLetters:ehp1.:lm margin=1.
  1191. :li.
  1192. :li.
  1193. :hp2.Comments:ehp2.:lm margin=14.The :hp2.Def:ehp2.:hp3.type:ehp3. statement specifies the default :link reftype=hd res=20100.:hp5.data type:ehp5.:elink. of a 
  1194. variable which begins with one of the letters specified in :hp1.varTypeLetters:ehp1.&per.:lm margin=1.
  1195. :li.
  1196. :lm margin=14.The :hp1.varTypeLetters:ehp1. are specified as a comma-separated list of 
  1197. letters; a range of letters may also be specified&per.  For example, a-d indicates 
  1198. the letters a,b,c and d&per.:lm margin=1.
  1199. :li.
  1200. :lm margin=14.The case of the letters is not important, even in a letter range&per.  
  1201. The letter range a-z is treated as a special case - it denotes all alpha 
  1202. characters, including the international characters&per.:lm margin=1.
  1203. :li.
  1204. :lm margin=14.The :hp2.Def:ehp2.:hp3.type:ehp3. statement only affects the module in which it is 
  1205. spacified&per.  It must precede any variable definition within the module&per.:lm margin=1.
  1206. :li.
  1207. :lm margin=14.Variables defined using the Global or Dim may override the :hp2.Def:ehp2.:hp3.type:ehp3. 
  1208. statement by using an :hp2.As:ehp2. clause or a :link reftype=fn refid=typeCharacter.:hp5.type character:ehp5.:elink.&per.:lm margin=1.
  1209. :li.
  1210. :esl.
  1211. :h2 x=right y=bottom width=50% height=100% res=10550.Dialog
  1212. :i1 id=ix62.Dialog
  1213. :i1 id=ix63.Dim
  1214. :i2 refid=ix63.Dialog
  1215. :i2 refid=ix9.Dialog
  1216. :i2 refid=ix14.Dialog
  1217. :sl compact.
  1218. :hp2.Dialog Statement:ehp2.
  1219. :li.
  1220. :li.
  1221. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Dialog:ehp2.:hp1. recordName:ehp1.:lm margin=1.
  1222. :li.
  1223. :li.
  1224. :hp2.Comments:ehp2.:lm margin=14.The :hp2.Dialog:ehp2. statement displays a dialog box&per.  The data for the 
  1225. controls of the dialog box comes from the dialog box record :hp1.recordName:ehp1.&per.:lm margin=1.
  1226. :li.
  1227. :lm margin=14.The dialog box :hp1.recordName:ehp1. must have been declared using the :link reftype=hd res=10600.:hp7.Dim:ehp7.:elink. 
  1228. statement&per.  If the user exits the dialog box by pushing the Cancel button, a 
  1229. run-time error will be triggered which can be trapped using :link reftype=hd res=12060.:hp7.On Error:ehp7.:elink.&per.:lm margin=1.
  1230. :li.
  1231. :esl.
  1232. :h2 x=right y=bottom width=50% height=100% res=10600.Dim
  1233. :i2 refid=ix63.Dim
  1234. :i1 id=ix64.As
  1235. :i2 refid=ix64.Dim
  1236. :i2 refid=ix39.Dim
  1237. :i2 refid=ix9.Dim
  1238. :i2 refid=ix40.Dim
  1239. :i2 refid=ix41.Dim
  1240. :i2 refid=ix42.Dim
  1241. :i2 refid=ix43.Dim
  1242. :i2 refid=ix44.Dim
  1243. :i2 refid=ix14.Dim
  1244. :i1 id=ix65.ReDim
  1245. :i2 refid=ix65.Dim
  1246. :i2 refid=ix45.Dim
  1247. :i1 id=ix66.Arrays
  1248. :i2 refid=ix66.Dim
  1249. :i1 id=ix67.Records
  1250. :i2 refid=ix67.Dim
  1251. :sl compact.
  1252. :hp2.Dim Statement:ehp2.
  1253. :li.
  1254. :li.
  1255. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Dim :ehp2.[ :hp2.Shared :ehp2.] :hp1.variableName:ehp1.:hp2. :ehp2.[:hp2.As :ehp2.:hp1.type:ehp1.] [,:hp1.variableName :ehp1.[:hp2.As:ehp2. :hp1.t:ehp1.:hp1.ype:ehp1.]] :hp2. 
  1256. &per.&per.&per.:ehp2.:lm margin=1.
  1257. :li.
  1258. :li.
  1259. :hp2.Comments:ehp2.:lm margin=14.You use the :hp2.Dim:ehp2. statement to declare variables for use in a BASIC 
  1260. program&per.  BASIC is a strongly typed language&per.  The available :link reftype=hd res=20100.:hp5.data types:ehp5.:elink. are&colon.   
  1261. numbers, strings, records, arrays, dialog boxes and Application Data Types 
  1262. (ADTs)&per.:lm margin=1.
  1263. :li.
  1264. :lm margin=14.If the :hp2.As:ehp2. clause is not used,  the type of the variable may be 
  1265. specified by using a  :link reftype=fn refid=typeCharacter.:hp5.type character:ehp5.:elink. as a suffix to the :hp1.variableName:ehp1.&per.  The two 
  1266. different type-specification methods can be intermixed in a single :hp2.Dim:ehp2. 
  1267. statement (although not on the same variable)&per.:lm margin=1.
  1268. :li.
  1269. :li.
  1270. :lm margin=14.:hp2.Numbers:ehp2.:lm margin=1.
  1271. :li.
  1272. :lm margin=14.Numeric variables can be declared using the :hp2.As:ehp2. clause and one of 
  1273. the following numeric types&colon.  :hp2.Integer:ehp2., :hp2.Long:ehp2., :hp2.Single:ehp2., :hp2.Double:ehp2.&per.  Numeric variables 
  1274. can also be declared  by including a :link reftype=fn refid=typeCharacter.:hp5.type character:ehp5.:elink. as a suffix to the name&per. :lm margin=1.
  1275. :li.
  1276. :li.
  1277. :lm margin=14.:hp2.Strings:ehp2.:lm margin=1.
  1278. :li.
  1279. :lm margin=14.BASIC supports two types of strings, fixed-length and dynamic&per.  
  1280. Fixed-length strings are declared with a specific length (between 1 and 32767) 
  1281. and cannot be changed later&per.  Use the following syntax to declare a 
  1282. fixed-length string&colon.
  1283. :li.
  1284. :li.
  1285. :lm margin=14.:hp2.Dim:ehp2. :hp1.variableName:ehp1. :hp2.As:ehp2. :hp2.String*:ehp2.:hp1.length:ehp1.:lm margin=1.
  1286. :li.
  1287. :lm margin=14.Dynamic strings have no declared length, and can vary in length 
  1288. from 0 to 32767&per.  The initial length for a dynamic string is 0&per.  Use the 
  1289. following syntax to declare a dynamic string&colon.
  1290. :li.
  1291. :li.
  1292. :lm margin=14.:hp2.Dim:ehp2. :hp1.variableName$:ehp1.
  1293. :li.
  1294. or:lm margin=14.:hp2.Dim:ehp2. :hp1.variableName:ehp1. :hp2.As:ehp2. :hp2.String:ehp2.:lm margin=1.
  1295. :li.
  1296. :li.
  1297. :lm margin=14.:hp2.Records:ehp2.:lm margin=1.
  1298. :li.
  1299. :lm margin=14.Record variables are declared by using an :hp2.As:ehp2. clause and a :hp1.typeName:ehp1. 
  1300. which has previously been defined using the :link reftype=hd res=12560.:hp7.Type:ehp7.:elink. statement&per.  The syntax to use 
  1301. is&colon.
  1302. :li.
  1303. :li.
  1304. :lm margin=14.:hp2.Dim:ehp2. :hp1.variableName:ehp1. :hp2.As:ehp2. :hp1.typeName:ehp1.:lm margin=1.
  1305. :li.
  1306. :lm margin=14.Records are made up of a collection of data elements called 
  1307. fields&per.  These fields may be of any numeric, string, or previously-defined 
  1308. record type&per.  See :link reftype=hd res=12560.:hp7.Type:ehp7.:elink. for details on accessing fields within a record&per.:lm margin=1.
  1309. :li.
  1310. :lm margin=14.You can also use the :hp2.Dim:ehp2. statement to declare a dialog record&per.  In 
  1311. this case :hp1.type:ehp1. is specified as [:hp2.Dialog:ehp2.]:hp1.dialogName:ehp1., where :hp1.dialogName:ehp1. matches a 
  1312. dialog box name previously defined using :link reftype=hd res=10115.:hp7.Begin Dialog:ehp7.:elink.&per.   The dialog record 
  1313. variable can then be used in a :link reftype=hd res=10550.:hp7.Dialog:ehp7.:elink. statement&per.:lm margin=1.
  1314. :li.
  1315. :lm margin=14.Dialog records have the same behaviour as regular records - they 
  1316. differ only in the way they are defined&per.  Some applications may provide a 
  1317. number of pre-defined  dialog boxes&per.:lm margin=1.
  1318. :li.
  1319. :li.
  1320. :lm margin=14.:hp2.Arrays:ehp2.:lm margin=1.
  1321. :li.
  1322. :lm margin=14.The available :link reftype=hd res=20100.:hp5.data types:ehp5.:elink. for arrays are&colon.  numbers, strings, and 
  1323. records&per.  Arrays of arrays, :link reftype=hd res=20300.:hp5.dialog box records:ehp5.:elink., and :link reftype=hd res=20200.:hp5.ADTs:ehp5.:elink. are not supported&per.:lm margin=1.
  1324. :li.
  1325. :lm margin=14.Array variables are declared by including a subscript list  as 
  1326. part of the :hp1.variableName:ehp1.&per.  The syntax to use for :hp1.variableName:ehp1.is&colon.
  1327. :li.
  1328. :li.
  1329. :lm margin=14.:hp2.Dim:ehp2. :hp1.variable:ehp1.(  [ :hp1.subscriptRange:ehp1., &per.&per.&per. ]  ) :hp2.As:ehp2. :hp1.typeName:ehp1.
  1330. :li.
  1331. or:lm margin=14.:hp2.Dim:ehp2. :hp1.variable_with_suffix:ehp1.( [ :hp1.subscriptRange:ehp1., &per.&per.&per. ] )
  1332. :li.
  1333. :li.
  1334. where :hp1.subscriptRange :ehp1.is of the format&colon.
  1335. :li.
  1336. :li.
  1337. :lm margin=14.[ :hp1.startSubscript:ehp1. :hp2.To:ehp2. ] :hp1.endSubscript:ehp1.:lm margin=1.
  1338. :li.
  1339. :lm margin=14.If :hp1.startSubscript:ehp1. is not specified, 0 is used as the default&per.  The :link reftype=hd res=12073.:hp7.
  1340. Option Base:ehp7.:elink. statement can be used to change the default&per.:lm margin=1.
  1341. :li.
  1342. :lm margin=14.Both the :hp1.startSubscript:ehp1. and the :hp1.endSubscript:ehp1. are valid subscripts 
  1343. for the array&per.  The maximum number of subscripts which may be specified in an 
  1344. array definition is 60&per.  The maximum total size for an array (not counting 
  1345. space for dynamic strings) is 65536 bytes&per.:lm margin=1.
  1346. :li.
  1347. :lm margin=14.If no :hp1.subscr:ehp1.:hp1.iptRange:ehp1. is specified for an array, the array is 
  1348. declared as a dynamic array&per.  In this case, the :link reftype=hd res=12087.:hp7.ReDim:ehp7.:elink. statement must be used to 
  1349. specify the dimensions of the array before the array can be used&per.:lm margin=1.
  1350. :li.
  1351. :lm margin=1.:li.
  1352. :lm margin=1.:li.
  1353. :lm margin=14.A variable declared inside of a procedure has scope local to that 
  1354. procedure&per.  A variable declared outside of a procedure has scope local to the 
  1355. module&per.  It is permissible for a procedure to declare a variable with a name 
  1356. that matches a module variable&per.  When this happens, the module variable is not 
  1357. accessible by the procedure&per.:lm margin=1.
  1358. :li.
  1359. :lm margin=14.The :hp2.Shared:ehp2. keyword is included for backward compatibility with 
  1360. older versions of Basic&per.  It is not allowed in :hp2.Dim:ehp2. statements inside of a 
  1361. procedure&per.  It has no effect&per.:lm margin=1.
  1362. :li.
  1363. :lm margin=14.BASIC allows a variable to be automatically declared, without the 
  1364. use of a :hp2.Dim:ehp2. statement&per.  If a variable is first used with a :link reftype=fn refid=typeCharacter.:hp5.type character:ehp5.:elink. as a 
  1365. suffix to its name, the variable is automatically declared to be a local 
  1366. variable of the specified type&per.  If no :link reftype=fn refid=typeCharacter.:hp5.type character:ehp5.:elink. is specified, the 
  1367. variable is automatically declared to be a local variable of type :hp2.Double:ehp2.&per.  It 
  1368. is considered good programming practice to declare all variables, and not make 
  1369. use of this feature&per.  It is also recommended that you place all procedure-level :hp2.
  1370. Dim:ehp2. statements at the beginning of the procedure&per.  (Obviously this cannot be 
  1371. done for dialog box records, as they must follow the :link reftype=hd res=10115.:hp7.Begin Dialog:ehp7.:elink.:lm margin=1.
  1372. :li.
  1373. :lm margin=14.Regardless of what mechanism you used to declare a variable, you 
  1374. may chose to use or omit the type character when referring to the variable in 
  1375. the rest of your program&per.  The type suffix is not considered part of the 
  1376. variable name&per.:lm margin=1.
  1377. :li.
  1378. :esl.
  1379. :h2 x=right y=bottom width=50% height=100% res=10610.Dir$
  1380. :i1 id=ix68.Dir$
  1381. :i2 refid=ix3.Dir$
  1382. :i2 refid=ix29.Dir$
  1383. :i2 refid=ix28.Dir$
  1384. :sl compact.
  1385. :hp2.Dir$ Function:ehp2.
  1386. :li.
  1387. :li.
  1388. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Dir$ :ehp2.[(:hp1.filespec$:ehp1.)]:lm margin=1.
  1389. :li.
  1390. :li.
  1391. :hp2.Returns:ehp2.:lm margin=14.The :hp2.Dir$:ehp2. function returns a filename that matches the specified 
  1392. pattern&per. :lm margin=1.
  1393. :li.
  1394. :li.
  1395. :hp2.Comments:ehp2.:lm margin=14.:hp1.Filespec$ :ehp1.is a string expression identifying a path or filename&per.  
  1396. This argument may include a drive specification&per.  It may also include the 
  1397. "wildcard" characters '?' and '*'&per.  :hp2.Dir$:ehp2. will return the first filename that 
  1398. matches the :hp1.filespec$:ehp1. argument&per.  To retrieve additional filenames that match the:hp1.
  1399.  filespec$:ehp1., call the :hp2.Dir$:ehp2. function again, omitting the :hp1.filespec$:ehp1. argument&per.  If 
  1400. no file is found, an empty string ("") is returned&per.:lm margin=1.
  1401. :li.
  1402. :esl.
  1403. :h2 x=right y=bottom width=50% height=100% res=10612.Do&per.&per.&per.While
  1404. :i1 id=ix69.Do&per.&per.&per.While
  1405. :i2 refid=ix69.Do&per.&per.&per.While
  1406. :i1 id=ix70.Until
  1407. :i1 id=ix71.Exit
  1408. :i2 refid=ix71.Do&per.&per.&per.While
  1409. :i2 refid=ix9.Do&per.&per.&per.While
  1410. :i1 id=ix72.Looping
  1411. :i2 refid=ix72.Do&per.&per.&per.While
  1412. :sl compact.
  1413. :hp2.Do&per.&per.&per.While Statement:ehp2.
  1414. :li.
  1415. :li.
  1416. :hp2.Syntax A:ehp2.:lm margin=14.:hp2.Do:ehp2. [ { :hp2.While:ehp2. | :hp2.Until :ehp2.} :hp1.condition:ehp1.]:lm margin=1.
  1417. :li.
  1418. :lm margin=14.:lm margin=14.[ :hp1.statementblock:ehp1. ]:lm margin=1.
  1419. :li.
  1420. :lm margin=14.:lm margin=14.[ :hp2.Exit:ehp2. :hp2.Do:ehp2. ]:lm margin=1.
  1421. :li.
  1422. :lm margin=14.:lm margin=14.     [ :hp1.statementblock:ehp1. ]:lm margin=1.
  1423. :li.
  1424. :lm margin=14.:hp2.Loop :ehp2.:lm margin=1.
  1425. :li.
  1426. :li.
  1427. :hp2.Syntax  B:ehp2.:lm margin=14.:hp2.Do:ehp2. :lm margin=1.
  1428. :li.
  1429. :lm margin=14.:lm margin=14.[ :hp1.statementblock:ehp1. ]:lm margin=1.
  1430. :li.
  1431. :lm margin=14.:lm margin=14.[ :hp2.Exit Do:ehp2. ]:lm margin=1.
  1432. :li.
  1433. :lm margin=14.:lm margin=14.[ :hp1.statementblock:ehp1. ]:lm margin=1.
  1434. :li.
  1435. :lm margin=14.:hp2.Loop:ehp2. [ { :hp2.While:ehp2. | :hp2.Until:ehp2. } :hp1.condition:ehp1.]:lm margin=1.
  1436. :li.
  1437. :li.
  1438. :hp2.Comments:ehp2.:lm margin=14.:hp1.Condition:ehp1. is any expression that BASIC can determine to be TRUE 
  1439. (nonzero) or FALSE (0)&per.  BASIC will repeat the program lines contained in the :hp1.
  1440. statementblock(s):ehp1. as long as a :hp2.While:ehp2. condition is true or until an :hp2.Until:ehp2. 
  1441. condition is FALSE&per.  :lm margin=1.
  1442. :li.
  1443. :lm margin=14.When an :hp2.Exit Do:ehp2. statement is executed, control is transferred to 
  1444. the statement which follows the loop statement&per.  When used within a nested 
  1445. loop, an :hp2.Exit Do:ehp2. statement moves control out of the immediately enclosing loop&per.:lm margin=1.
  1446. :li.
  1447. :esl.
  1448. :h2 x=right y=bottom width=50% height=100% res=10615.Environ$
  1449. :i1 id=ix73.Environ$
  1450. :i2 refid=ix3.Environ$
  1451. :sl compact.
  1452. :hp2.Environ$ Function:ehp2.
  1453. :li.
  1454. :li.
  1455. :hp2.Syntax A:ehp2.:lm margin=14.:hp2.Environ$:ehp2.(:hp1.environment-string$:ehp1.):lm margin=1.
  1456. :li.
  1457. :li.
  1458. :hp2.Syntax B:ehp2.:lm margin=14.:hp2.Environ$:ehp2.( n% ):lm margin=1.
  1459. :li.
  1460. :li.
  1461. :hp2.Returns:ehp2.:lm margin=14.The :hp2.Environ$:ehp2. function returns a string from the operating system's 
  1462. environment table&per. :lm margin=1.
  1463. :li.
  1464. :li.
  1465. :hp2.Comments:ehp2.:lm margin=14.The argument of the :hp2.Environ$:ehp2. function may be either a string (:hp1.
  1466. environment-string$:ehp1.) or an integer ( :hp1.n%:ehp1.)&per.    :lm margin=1.
  1467. :li.
  1468. :lm margin=14.:hp1.Environment-string$:ehp1. is the name of a keyword in the operating 
  1469. system environment&per.  If this argument is given, it must be entered in 
  1470. uppercase, or it will return a null string&per.  The value associated with the 
  1471. keyword will be returned&per.:lm margin=1.
  1472. :li.
  1473. :lm margin=14.:hp1.N%:ehp1. represents one of the strings from the operating system 
  1474. environment parameters&per.  This may be any numeric expression, but it will be 
  1475. rounded to a whole number by :hp2.Environ$:ehp2.&per.  If this argument is used, :hp2.Environ$:ehp2. will 
  1476. return the :hp1.n:ehp1.th string from the environment table&per.  This string will be in the 
  1477. form "keyword = value&per.":lm margin=1.
  1478. :li.
  1479. :lm margin=14.A null string will be returned if the specified argument cannot be 
  1480. found&per.:lm margin=1.
  1481. :li.
  1482. :esl.
  1483. :h2 x=right y=bottom width=50% height=100% res=10620.Eof
  1484. :i1 id=ix74.Eof
  1485. :i2 refid=ix3.Eof
  1486. :i2 refid=ix29.Eof
  1487. :sl compact.
  1488. :hp2.Eof Function:ehp2.
  1489. :li.
  1490. :li.
  1491. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Eof :ehp2.(:hp1.filenumber%:ehp1.):lm margin=1.
  1492. :li.
  1493. :li.
  1494. :hp2.Returns:ehp2.:lm margin=14.:hp2.Eof:ehp2. returns a value indicating whether the end of a file has been 
  1495. reached&per.  :lm margin=1.
  1496. :li.
  1497. :li.
  1498. :hp2.Comments:ehp2.:lm margin=14.The :hp2.Eof:ehp2. Function returns a ( -1 ) if the end-of-file condition is 
  1499. true for the specified file&per.  The :hp1.filenumber%:ehp1. is the number used in the :link reftype=hd res=12070.:hp7.Open:ehp7.:elink. 
  1500. statement of the file&per.:lm margin=1.
  1501. :li.
  1502. :esl.
  1503. :h2 x=right y=bottom width=50% height=100% res=10640.Erl
  1504. :i1 id=ix75.Erl
  1505. :i2 refid=ix3.Erl
  1506. :i1 id=ix76.Error Handling
  1507. :i2 refid=ix76.Erl
  1508. :sl compact.
  1509. :hp2.Erl Function:ehp2.
  1510. :li.
  1511. :li.
  1512. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Erl :ehp2.:lm margin=1.
  1513. :li.
  1514. :li.
  1515. :hp2.Returns:ehp2.:lm margin=14.:hp2.Erl:ehp2. returns the line number where an error was trapped&per.:lm margin=1.
  1516. :li.
  1517. :li.
  1518. :hp2.Comments:ehp2.:lm margin=14.Using the :link reftype=hd res=12095.:hp7.Resume:ehp7.:elink. or  :link reftype=hd res=12060.:hp7.On Error:ehp7.:elink.  statements will reset the :hp2.Erl:ehp2. value 
  1519. to 0&per.  If you wish to maintain the value of the line number returned by :hp2.Erl:ehp2., 
  1520. you should assign it to a variable&per.:lm margin=1.
  1521. :li.
  1522. :lm margin=14.The value of the :hp2.Erl:ehp2. function can be set indirectly through the :link reftype=hd res=10650.:hp5.
  1523. Error:ehp5.:elink. statement&per.:lm margin=1.
  1524. :li.
  1525. :esl.
  1526. :h2 x=right y=bottom width=50% height=100% res=10645.Err
  1527. :i1 id=ix77.Err
  1528. :i2 refid=ix3.Err
  1529. :i2 refid=ix76.Err
  1530. :sl compact.
  1531. :hp2.Err Function:ehp2.
  1532. :li.
  1533. :li.
  1534. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Err:ehp2.:lm margin=1.
  1535. :li.
  1536. :li.
  1537. :hp2.Returns:ehp2.:lm margin=14.:hp2.E:ehp2.:hp2.rr:ehp2. returns the run-time error code for the last error that was 
  1538. trapped&per.:lm margin=1.
  1539. :li.
  1540. :li.
  1541. :hp2.Comments:ehp2.:lm margin=14.Using the :link reftype=hd res=12095.:hp7.Resume:ehp7.:elink. or :link reftype=hd res=12060.:hp7.On Error:ehp7.:elink.  statements will reset the :hp2.Err:ehp2. value 
  1542. to 0&per.  If you wish to maintain the value of the error code returned by :hp2.Err:ehp2., you 
  1543. should assign it to a variable&per.:lm margin=1.
  1544. :li.
  1545. :lm margin=14.The value of the :hp2.Err:ehp2. function can be set directly through the :hp2.Err:ehp2. 
  1546. statement, and indirectly through the :link reftype=hd res=10650.:hp7.Error:ehp7.:elink. statement&per. :lm margin=1.
  1547. :li.
  1548. :lm margin=14.The :link reftype=hd res=1.:hp5.Trappable Errors:ehp5.:elink. are listed in an appendix&per.:lm margin=1.
  1549. :li.
  1550. :esl.
  1551. :h2 x=right y=bottom width=50% height=100% res=10646.Err Statement
  1552. :i1 id=ix78.Err Statement
  1553. :i2 refid=ix9.Err Statement
  1554. :i2 refid=ix76.Err Statement
  1555. :sl compact.
  1556. :hp2.Err Statement:ehp2.
  1557. :li.
  1558. :li.
  1559. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Err :ehp2.= :hp1.  n%:ehp1.:lm margin=1.
  1560. :li.
  1561. :li.
  1562. :hp2.Comments:ehp2.:lm margin=14.The argument :hp1.n%:ehp1. must be a 0 (indicating that no run-time error has 
  1563. been trapped) or an integer expression indicating a run-time error code (having 
  1564. a value between 1 and 32,767)&per.  The :hp2.Err:ehp2. statement is used to send error 
  1565. information between  procedures&per.:lm margin=1.
  1566. :li.
  1567. :esl.
  1568. :h2 x=right y=bottom width=50% height=100% res=10650.Error
  1569. :i1 id=ix79.Error
  1570. :i2 refid=ix9.Error
  1571. :i2 refid=ix76.Error
  1572. :sl compact.
  1573. :hp2.Error Statement:ehp2.
  1574. :li.
  1575. :li.
  1576. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Error :ehp2.:hp1.errorcode%:ehp1.:lm margin=1.
  1577. :li.
  1578. :li.
  1579. :hp2.Comments:ehp2.:lm margin=14.:hp2.Error:ehp2. :hp1.errcode% :ehp1.simulates the occurrence of a SBL or user-defined 
  1580. error&per.  The :hp1.errorcode%:ehp1. argument , which represents the error code, must be an 
  1581. integer between 1 and 32,767&per.  If an :hp1.er:ehp1.:hp1.rcode%:ehp1. is one which SBL already uses, 
  1582. the :hp2.Error:ehp2. statement will simulate an occurrence of that error&per.  :lm margin=1.
  1583. :li.
  1584. :lm margin=14.User-defined error codes should employ values greater than those 
  1585. used for standard SBL error codes&per.  To help ensure that non-SBL error codes are 
  1586. chosen, user-defined codes should work down from 32,767&per.:lm margin=1.
  1587. :li.
  1588. :lm margin=14.If an :hp2.Error:ehp2. statement is executed, and there is no error-handling 
  1589. routine enabled, SBL produces an error message and halts program execution&per.  If 
  1590. an :hp2.Error:ehp2. statement specified an error code not used by SBL, the message 
  1591. "User-defined error" is displayed&per.:lm margin=1.
  1592. :li.
  1593. :esl.
  1594. :h2 x=right y=bottom width=50% height=100% res=10655.Error Function
  1595. :i1 id=ix80.Error$
  1596. :i2 refid=ix3.Error Function
  1597. :i2 refid=ix76.Error Function
  1598. :sl compact.
  1599. :hp2.Error$ Function:ehp2.
  1600. :li.
  1601. :li.
  1602. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Error$ :ehp2.[(:hp1.errorcode%:ehp1.)]:lm margin=1.
  1603. :li.
  1604. :li.
  1605. :hp2.Returns:ehp2.:lm margin=14.:hp2.Error$:ehp2. returns the error message that corresponds to the specified 
  1606. error code&per.:lm margin=1.
  1607. :li.
  1608. :li.
  1609. :hp2.Comments:ehp2.:lm margin=14.The :hp1.errorcode%:ehp1. argument , which represents the error code, must be 
  1610. an integer between 1 and 32,767&per.  If this argument is omitted, BASIC returns 
  1611. the error message for the run-time error which has occurred most recently&per.  :lm margin=1.
  1612. :li.
  1613. :lm margin=14.If no error message is found to match the errorcode, "" is 
  1614. returned&per. :lm margin=1.
  1615. :li.
  1616. :lm margin=14.The :hp5.Trappable Err:ehp5.:link reftype=hd res=1.:hp5.ors:ehp5.:elink. are listed in an appendix&per.:lm margin=1.
  1617. :li.
  1618. :esl.
  1619. :h2 x=right y=bottom width=50% height=100% res=10700.Exit
  1620. :i2 refid=ix71.Exit
  1621. :i2 refid=ix20.Exit
  1622. :i2 refid=ix55.Exit
  1623. :i2 refid=ix9.Exit
  1624. :i2 refid=ix69.Exit
  1625. :i1 id=ix81.For&per.&per.&per.Next
  1626. :i2 refid=ix81.Exit
  1627. :sl compact.
  1628. :hp2.Exit Statement:ehp2.
  1629. :li.
  1630. :li.
  1631. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Exit :ehp2.{:hp2.Do :ehp2.|:hp2. For:ehp2.| :hp2.Function :ehp2.|:hp2. Sub:ehp2.}:lm margin=1.
  1632. :li.
  1633. :li.
  1634. :hp2.Comments:ehp2.:lm margin=14.:hp2.Exit Do:ehp2. and :hp2.Exit For:ehp2. terminate loop statements&per.  :hp2.Exit Do:ehp2. can only 
  1635. be used within a :link reftype=hd res=10612.:hp7.Do&per.&per.&per.Loop:ehp7.:elink. statement&per.  :hp2.Exit For:ehp2. can only be used within a :link reftype=hd res=10740.:hp7.
  1636. For&per.&per.&per.Next:ehp7.:elink. statement&per.  In both cases, control is transferred to the statement 
  1637. which follows the loop statement&per.  When used within a nested loop, an Exit 
  1638. statement moves control out of the immediately enclosing loop&per.:lm margin=1.
  1639. :li.
  1640. :lm margin=14.The :hp2.Exit Function :ehp2.and :hp2.Exit Su:ehp2.:hp2.b:ehp2. statements transfer control from 
  1641. the current procedure back to the original calling procedure&per.  :hp2.Exit Function :ehp2.
  1642. must be used in a :link reftype=hd res=10900.:hp7.Function:ehp7.:elink. procedure&per.  :hp2.Exit Sub:ehp2. can only be used to exit from a :link reftype=hd res=12500.:hp7.
  1643. Sub:ehp7.:elink. procedure &per.:lm margin=1.
  1644. :li.
  1645. :esl.
  1646. :h2 x=right y=bottom width=50% height=100% res=10705.Exp
  1647. :i1 id=ix82.Exp
  1648. :i2 refid=ix3.Exp
  1649. :i1 id=ix83.Numeric Functions
  1650. :i2 refid=ix83.Exp
  1651. :sl compact.
  1652. :hp2.Exp Function:ehp2.
  1653. :li.
  1654. :li.
  1655. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Exp( :ehp2.:hp1.numeric-expression:ehp1.:hp2. ):ehp2.:lm margin=1.
  1656. :li.
  1657. :li.
  1658. :hp2.Returns:ehp2.:lm margin=14.The :hp2.Exp:ehp2. function returns the value :hp1.e:ehp1. raised to the :hp1.
  1659. numeric-expression:ehp1. power&per.:lm margin=1.
  1660. :li.
  1661. :li.
  1662. :hp2.Comment:ehp2.:lm margin=14.The return value is single-precision for an integer or 
  1663. single-precision numeric expression, double precision for a long or 
  1664. double-precision numeric expression&per.:lm margin=1.
  1665. :li.
  1666. :esl.
  1667. :h2 x=right y=bottom width=50% height=100% res=10710.FileAttr
  1668. :i1 id=ix84.FileAttr
  1669. :i2 refid=ix3.FileAttr
  1670. :i2 refid=ix29.FileAttr
  1671. :sl compact.
  1672. :hp2.FileAttr Function:ehp2.
  1673. :li.
  1674. :li.
  1675. :hp2.Syntax:ehp2.:lm margin=14.:hp2.FileAttr:ehp2. (:hp1. filenumber%, attribute% :ehp1.:hp2.):ehp2.:lm margin=1.
  1676. :li.
  1677. :li.
  1678. :hp2.Returns:ehp2.:lm margin=14.The :hp2.FileAttr:ehp2. function returns information about an open file&per.  
  1679. Depending on the attribute chosen, this information is either the file mode or 
  1680. the operating system handle&per.:lm margin=1.
  1681. :li.
  1682. :li.
  1683. :hp2.Comments:ehp2.:lm margin=14.The argument :hp1.filenumber%:ehp1. is the number used in the :link reftype=hd res=12070.:hp7.Open:ehp7.:elink. statement 
  1684. to open the file&per.  The argument :hp1.attribute%:ehp1. is either a 1 or 2&per.  The following 
  1685. table lists the return values and corresponding file modes if :hp1.attribute%:ehp1. is 1&colon.:lm margin=1.
  1686. :li.
  1687. :lm margin=14.:lm margin=14.:hp7.V:ehp7.:hp7.alue:ehp7.:lm margin=23.:hp7.Mode:lm margin=14.:ehp7.:lm margin=1.
  1688. :li.
  1689. :lm margin=14.:lm margin=14.     1:lm margin=23.:hp2.Input:lm margin=14.:ehp2.
  1690. :li.
  1691. :lm margin=14.     2:lm margin=23.:hp2.Output:lm margin=14.:ehp2.
  1692. :li.
  1693. :lm margin=14.     8:lm margin=23.:hp2.Append:lm margin=14.:ehp2.:lm margin=1.
  1694. :li.
  1695. :lm margin=14. If :hp1.attribute%:ehp1. is 2, :hp2.FileAttr:ehp2. returns the operating system handle 
  1696. for the file&per.:lm margin=1.
  1697. :li.
  1698. :esl.
  1699. :h2 x=right y=bottom width=50% height=100% res=10730.Fix
  1700. :i1 id=ix85.Fix
  1701. :i2 refid=ix3.Fix
  1702. :i2 refid=ix4.Fix
  1703. :sl compact.
  1704. :hp2.Fix Function:ehp2.
  1705. :li.
  1706. :li.
  1707. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Fix (:ehp2.:hp1. numeric-expression :ehp1.:hp2.):ehp2.:lm margin=1.
  1708. :li.
  1709. :li.
  1710. :hp2.Returns:ehp2.:lm margin=14.:hp2.Fix:ehp2. returns the integer part of a :hp1.numeric-expression:ehp1.&per.:lm margin=1.
  1711. :li.
  1712. :li.
  1713. :hp2.Comments:ehp2.:lm margin=14.The argument given is any :hp1.numeric-expression&per. :ehp1. For both positive 
  1714. and negative:hp1. numeric-expressions, :ehp1.:hp2.Fix:ehp2. removes the fractional part of the 
  1715. expression and returns the integer part only&per.  For example,  :hp2.Fix:ehp2. (6&per.2) returns 
  1716. 6;  :hp2.Fix:ehp2. (-6&per.2) returns -6&per.  See :link reftype=hd res=10227.:hp7.CInt:ehp7.:elink. and :link reftype=hd res=11310.:hp7.Int:ehp7.:elink.&per.:lm margin=1.
  1717. :li.
  1718. :esl.
  1719. :h2 x=right y=bottom width=50% height=100% res=10740.For&per.&per.&per.Next
  1720. :i2 refid=ix81.For&per.&per.&per.Next
  1721. :i2 refid=ix9.For&per.&per.&per.Next
  1722. :i2 refid=ix72.For&per.&per.&per.Next
  1723. :i1 id=ix86.Next
  1724. :i1 id=ix87.To
  1725. :i2 refid=ix87.For&per.&per.&per.Next
  1726. :i1 id=ix88.Step
  1727. :sl compact.
  1728. :hp2.For&per.&per.&per.Next Statement:ehp2.
  1729. :li.
  1730. :li.
  1731. :hp2.Syntax:ehp2.:lm margin=14.:hp2.For :ehp2.:hp1.counter:ehp1. = :hp1.start:ehp1.:hp2. TO:ehp2. :hp1.end:ehp1.:hp2. :ehp2.[:hp2.STEP :ehp2.:hp1.increment:ehp1.:hp2.]:ehp2.:lm margin=1.
  1732. :li.
  1733. :lm margin=14.:lm margin=14.[ :hp1.statementblock :ehp1.]:lm margin=1.
  1734. :li.
  1735. :lm margin=14.:lm margin=14.[ :hp2.Exit:ehp2. :hp2.For:ehp2. ]:lm margin=1.
  1736. :li.
  1737. :lm margin=14.:lm margin=14.[ :hp1.statementblock:ehp1. ]:lm margin=1.
  1738. :li.
  1739. :lm margin=14.:hp2.Next :ehp2.[ :hp1.counter:ehp1. ]:lm margin=1.
  1740. :li.
  1741. :li.
  1742. :hp2.Comments:ehp2.:lm margin=14.The :hp2.For&per.&per.&per.Next:ehp2. Statement repeats the statement block a fixed 
  1743. number of times, determined by the values of :hp1.start:ehp1., :hp1.end:ehp1., and :hp1.step:ehp1.&per.:lm margin=1.
  1744. :li.
  1745. :lm margin=18.:hp2.Argument:ehp2.:lm margin=35.:hp2.Description:ehp2.:lm margin=1.
  1746. :li.
  1747. :lm margin=18.:hp1.counter:ehp1.:lm margin=35.Variable used as the loop counter&per.  :lm margin=1.
  1748. :li.
  1749. :lm margin=18.:hp1.start:ehp1.:lm margin=35.Beginning value of the counter&per.:lm margin=1.
  1750. :li.
  1751. :lm margin=18.:hp1.end:ehp1.:lm margin=35.Ending value of the counter&per.:lm margin=1.
  1752. :li.
  1753. :lm margin=18.:hp1.increment:ehp1.:lm margin=35.The amount by which the counter is changed 
  1754. each time the loop is run through&per.  (The default is one&per.):lm margin=1.
  1755. :li.
  1756. :lm margin=18.:hp1.statementblock:ehp1.:lm margin=35.BASIC functions, statements, or methods to be 
  1757. executed&per.:lm margin=1.
  1758. :li.
  1759. :lm margin=14.In order for a :hp2.For&per.&per.&per.Next:ehp2. loop to execute, the :hp1.start:ehp1. and :hp1.end:ehp1. 
  1760. values must be consistent with :hp1.increment:ehp1.&per.  If :hp1.end :ehp1.is greater than :hp1.start:ehp1., :hp1.
  1761. increment :ehp1.must be positive&per.  If:hp1. end:ehp1. is less than :hp1.start:ehp1., :hp1.increment:ehp1. must be 
  1762. negative&per.   BASIC compares the sign of (:hp1.end-start:ehp1.) with the sign of :hp2.Step:ehp2.&per.  If 
  1763. the signs are the same, and :hp1.end:ehp1. does not equal:hp1. start:ehp1., the :hp2.For&per.&per.&per.Next:ehp2. loop is 
  1764. entered&per.  If not, the loop is omitted in its entirety&per.:lm margin=1.
  1765. :li.
  1766. :lm margin=14.With a :hp2.For&per.&per.&per.Next:ehp2. loop, the program lines following the :hp2.For:ehp2. 
  1767. statement are executed until the :hp2.Next:ehp2. statement is encountered&per.  At this point, 
  1768. the :hp2.Step:ehp2. amount is added to the :hp1.counter :ehp1.and compared with the final value, :hp1.end:ehp1.&per. 
  1769.  If the beginning and ending values are the same, the loop executes once, 
  1770. regardless of the :hp2.Step:ehp2. value&per.  Otherwise, the :hp2.Step:ehp2. value controls the loop as 
  1771. follows&colon.:lm margin=1.
  1772. :li.
  1773. :lm margin=18.:hp2.Step Value:ehp2.:lm margin=35.:hp2.Loop Execution:ehp2.:lm margin=1.
  1774. :li.
  1775. :lm margin=18.Positive:lm margin=35.If :hp1.counter:ehp1. is less than or equal to :hp1.end:ehp1., the :hp2.
  1776. Step:ehp2. value is added to:hp1. counter:ehp1.&per.  Control returns to the statement after the :hp2.For:ehp2. 
  1777. statement and the process repeats&per.  If:hp1. counter:ehp1. is greater than :hp1.end:ehp1., the loop is 
  1778. exited; execution resumes with the statement following the :hp2.Next:ehp2. statement&per.:lm margin=1.
  1779. :li.
  1780. :lm margin=18.Negative:lm margin=35.The loop repeats until :hp1.counter:ehp1. is less than :hp1.
  1781. end:ehp1.&per.:lm margin=1.
  1782. :li.
  1783. :lm margin=18.Zero:lm margin=35.The loop repeats indefinitely&per.:lm margin=1.
  1784. :li.
  1785. :lm margin=14.Within the loop, the value of the:hp1. counter :ehp1.should not be changed, 
  1786. as changing the :hp1.counter :ehp1.will make programs more difficult to edit and debug&per.:lm margin=1.
  1787. :li.
  1788. :lm margin=14.:hp2.For&per.&per.&per.Next:ehp2. loops can be nested within one another&per.  Each nested 
  1789. loop should be given a unique variable name as its :hp1.counter:ehp1.&per.  The :hp2.Next:ehp2. statement 
  1790. for the inside loop must appear before the :hp2.Next:ehp2. statement for the outside loop&per. 
  1791. The :hp2.Exit For:ehp2. statement may be used as an alternative exit from :hp2.For&per.&per.&per.Next:ehp2. loops&per.:lm margin=1.
  1792. :li.
  1793. :lm margin=14.If the variable is left out of a :hp2.Next:ehp2. statement, the :hp2.Next:ehp2. 
  1794. statement will match the most recent :hp2.For:ehp2. statement&per.  If a :hp2.Next:ehp2. statement occurs 
  1795. prior to its corresponding :hp2.For:ehp2. statement, BASIC will return an error message&per. :lm margin=1.
  1796. :li.
  1797. :lm margin=14.Multiple consecutive :hp2.Next:ehp2. statements can be merged together&per.  If 
  1798. this is done, the counters must appear with the innermost counter first and the 
  1799. outermost counter last&per.  For example&colon.:lm margin=1.
  1800. :li.
  1801. :lm margin=14.:hp2.For i :ehp2.= 1:hp2. To:ehp2. 10:lm margin=1.
  1802. :li.
  1803. :lm margin=14.:lm margin=14.[ :hp1.statementblock:ehp1. ]:lm margin=1.
  1804. :li.
  1805. :lm margin=14.:lm margin=14.:hp2.For j:ehp2. = 1 :hp2.To:ehp2. 5:lm margin=1.
  1806. :li.
  1807. :lm margin=14.:lm margin=21.[ :lm margin=14.:hp1.statementblock :ehp1.]:lm margin=1.
  1808. :li.
  1809. :lm margin=14.:hp2.Next j, i:ehp2.:lm margin=1.
  1810. :li.
  1811. :esl.
  1812. :h2 x=right y=bottom width=50% height=100% res=10750.FreeFile
  1813. :i1 id=ix89.FreeFile
  1814. :i2 refid=ix3.FreeFile
  1815. :i2 refid=ix29.FreeFile
  1816. :sl compact.
  1817. :hp2.FreeFile Function:ehp2.
  1818. :li.
  1819. :li.
  1820. :hp2.Syntax:ehp2.:lm margin=14.:hp2.FreeFile:ehp2.:lm margin=1.
  1821. :li.
  1822. :li.
  1823. :hp2.Returns:ehp2.:lm margin=14.The :hp2.FreeFile:ehp2. function returns the lowest unused file number&per.:lm margin=1.
  1824. :li.
  1825. :li.
  1826. :hp2.Comments:ehp2.:lm margin=14.The :hp2.FreeFile:ehp2. function is used when you need to supply a file 
  1827. number, and want to make sure that you are not choosing a file number which is 
  1828. already being used&per.:lm margin=1.
  1829. :li.
  1830. :lm margin=14.The value returned can be used in a subsequent :link reftype=hd res=12070.:hp7.Open:ehp7.:elink. statement&per.:lm margin=1.
  1831. :li.
  1832. :esl.
  1833. :h2 x=right y=bottom width=50% height=100% res=10900.Function
  1834. :i2 refid=ix55.Function
  1835. :i2 refid=ix9.Function
  1836. :i1 id=ix90.End
  1837. :i2 refid=ix90.Function
  1838. :i2 refid=ix21.Function
  1839. :sl compact.
  1840. :hp2.Function &per.&per.&per. End Function Statement:ehp2.
  1841. :li.
  1842. :li.
  1843. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Function :ehp2.:hp1.name:ehp1.:hp2. [ ( :ehp2.:hp1.parameter:ehp1. [ :hp2.As:ehp2. :hp1.type:ehp1. ] &per.&per.&per.:hp2. ) ]:ehp2.:lm margin=1.
  1844. :li.
  1845. :lm margin=14.:lm margin=14.:hp1.name:ehp1.:hp2. = :ehp2.:hp1.expression:ehp1.:lm margin=1.
  1846. :li.
  1847. :lm margin=14.:hp2.End Function:ehp2.:lm margin=1.
  1848. :li.
  1849. :li.
  1850. :hp2.Comments:ehp2.:lm margin=14.The :hp2.Function&per.&per.End Function :ehp2.structure defines a function procedure&per. 
  1851.  The purpose of a function is to produce and return a single value of a 
  1852. specified type&per.  Recursion is supported&per. :lm margin=1.
  1853. :li.
  1854. :lm margin=14.The parameters are specified as a comma-separated list of 
  1855. parameter names&per.  The data type of a parameter may be specified by using a :link reftype=hd res=4.:hp5.type 
  1856. character:ehp5.:elink. or by using the :hp2.As:ehp2. clause&per.  Record parameters are declared by using 
  1857. an :hp2.As:ehp2. clause and a :hp1.type:ehp1. which has previously been defined using the :link reftype=hd res=12560.:hp7.Type:ehp7.:elink. 
  1858. statement&per.  Array parameters are indicated by using empty parentheses after the :hp1.
  1859. parameter:ehp1.&per.  The array dimensions are not be specified in the :hp2.Function:ehp2. 
  1860. statement&per.  All references to an array parameter within the body of the 
  1861. function must have a consistent number of dimensions&per.:lm margin=1.
  1862. :li.
  1863. :lm margin=14.In the :link reftype=hd res=10900.:hp7.Function:ehp7.:elink. statement, the :hp1.name:ehp1. of the function may end with a 
  1864. type character, which specifies the type that the function will return&per.  When 
  1865. calling the function, you need not specify the type character&per.:lm margin=1.
  1866. :li.
  1867. :lm margin=14.You specify the return value by assigning to the function name as 
  1868. if it were a variable or parameter&per.  If no such assignment occurs, the value 
  1869. returned will be 0 for numeric functions and the empty string ("") for string 
  1870. functions&per.  The function returns to the caller when the :hp2.End Function :ehp2.statement 
  1871. is reached or when an :hp7.Exit F:ehp7.:link reftype=hd res=10700.:hp7.unction:ehp7.:elink. statement is executed&per.:lm margin=1.
  1872. :li.
  1873. :lm margin=14.BASIC procedures use the :link reftype=fn refid=callByReference.:hp5.call by reference:ehp5.:elink. convention&per.  This means 
  1874. that if a procedure assigns a value to a parameter, it will modify the variable 
  1875. passed by the caller&per.  This feature should be used with great care&per.:lm margin=1.
  1876. :li.
  1877. :lm margin=14.Use :link reftype=hd res=12500.:hp7.Sub:ehp7.:elink. to define a procedure which has no return value&per.:lm margin=1.
  1878. :li.
  1879. :esl.
  1880. :h2 x=right y=bottom width=50% height=100% res=10950.GetCurValues
  1881. :i1 id=ix91.GetCurValues
  1882. :i2 refid=ix9.GetCurValues
  1883. :i2 refid=ix14.GetCurValues
  1884. :sl compact.
  1885. :hp2.GetCurValues Statement:ehp2.
  1886. :li.
  1887. :li.
  1888. :hp2.Syntax:ehp2.:lm margin=14.:hp2.GetCurValues :ehp2.:hp1.recordName:ehp1.:lm margin=1.
  1889. :li.
  1890. :li.
  1891. :hp2.Returns:ehp2.:lm margin=14.The :hp2.GetCurValues:ehp2. statement stores the current values for the 
  1892. application dialog box associated with the specified record&per.:lm margin=1.
  1893. :li.
  1894. :li.
  1895. :hp2.Comments:ehp2.:lm margin=14.:hp1.RecordName:ehp1. must have been previously dimensioned as an application 
  1896. dialog box&per.:lm margin=1.
  1897. :li.
  1898. :esl.
  1899. :h2 x=right y=bottom width=50% height=100% res=11000.GetField$
  1900. :i1 id=ix92.GetField$
  1901. :i2 refid=ix3.GetField$
  1902. :i2 refid=ix6.GetField$
  1903. :i1 id=ix93.Fields
  1904. :i2 refid=ix93.GetField$
  1905. :sl compact.
  1906. :hp2.GetField$ Function:ehp2.
  1907. :li.
  1908. :li.
  1909. :hp2.Syntax:ehp2.:lm margin=14.:hp2.GetField$( :ehp2.:hp1.string$, field_number%, separator_chars$:ehp1.:hp2. ):ehp2.:lm margin=1.
  1910. :li.
  1911. :li.
  1912. :hp2.Returns:ehp2.:lm margin=14.The :hp2.GetField$:ehp2. function returns a substring from a source string&per. :lm margin=1.
  1913. :li.
  1914. :li.
  1915. :hp2.Comments:ehp2.:lm margin=14. The source :hp1.string:ehp1. is considered to be divided into fields by 
  1916. separator characters&per.  Multiple separator characters may be specified&per.  The 
  1917. fields are numbered starting with one&per.:lm margin=1.
  1918. :li.
  1919. :lm margin=14.If :hp1.field_number:ehp1. is greater than the number of fields in the 
  1920. string, the empty string is returned&per.:lm margin=1.
  1921. :li.
  1922. :esl.
  1923. :h2 x=right y=bottom width=50% height=100% res=11050.Global
  1924. :i2 refid=ix45.Global
  1925. :i2 refid=ix64.Global
  1926. :i2 refid=ix39.Global
  1927. :i2 refid=ix9.Global
  1928. :i2 refid=ix40.Global
  1929. :i2 refid=ix41.Global
  1930. :i2 refid=ix42.Global
  1931. :i2 refid=ix43.Global
  1932. :i2 refid=ix44.Global
  1933. :i2 refid=ix14.Global
  1934. :i2 refid=ix63.Global
  1935. :i2 refid=ix65.Global
  1936. :i2 refid=ix66.Global
  1937. :i2 refid=ix67.Global
  1938. :sl compact.
  1939. :hp2.Global Statement:ehp2.
  1940. :li.
  1941. :li.
  1942. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Global :ehp2.:hp1.variableName:ehp1.:hp2. :ehp2.[:hp2.As :ehp2.:hp1.type:ehp1.] [,:hp1.variableName :ehp1.[:hp2.As:ehp2. :hp1.type:ehp1.]] :hp2. &per.&per.&per.:ehp2.:lm margin=1.
  1943. :li.
  1944. :li.
  1945. :hp2.Comments:ehp2.:lm margin=14.You use the :hp2.Global:ehp2. statement to declare global variables for use 
  1946. in a BASIC program&per.  BASIC is a strongly typed language&per.  The available :link reftype=hd res=20100.:hp5.data 
  1947. types:ehp5.:elink. are&colon.   numbers, strings, records, arrays, dialog boxes and Application 
  1948. Data Types (ADTs)&per.:lm margin=1.
  1949. :li.
  1950. :lm margin=14.Global data is shared across all loaded modules&per.  If an attempt is 
  1951. made to load a module which has a global variable declared which has a 
  1952. different data type than an existing global variable of the same name, the 
  1953. module load will fail&per.:lm margin=1.
  1954. :li.
  1955. :lm margin=14.If the :hp2.As:ehp2. clause is not used,  the type of the global variable may 
  1956. be specified by using a  :link reftype=fn refid=typeCharacter.:hp5.type character:ehp5.:elink. as a suffix to the :hp1.variableName:ehp1.&per.  The 
  1957. two different type-specification methods can be intermixed in a single :hp2.Global:ehp2. 
  1958. statement (although not on the same variable)&per.:lm margin=1.
  1959. :li.
  1960. :lm margin=14.Regardless of which mechanism you use to declare a global 
  1961. variable, you may chose to use or omit the type character when referring to the 
  1962. variable in the rest of your program&per.  The type suffix is not considered part 
  1963. of the variable name&per.:lm margin=1.
  1964. :li.
  1965. :li.
  1966. :lm margin=14.:hp2.Numbers:ehp2.:lm margin=1.
  1967. :li.
  1968. :lm margin=14.Numeric variables can be declared using the :hp2.As:ehp2. clause and one of 
  1969. the following numeric types&colon.  :hp2.Integer:ehp2., :hp2.Long:ehp2., :hp2.Single:ehp2., :hp2.Double:ehp2.&per.  Numeric variables 
  1970. can also be declared  by including a :link reftype=fn refid=typeCharacter.:hp5.type character:ehp5.:elink. as a suffix to the name&per. :lm margin=1.
  1971. :li.
  1972. :li.
  1973. :lm margin=14.:hp2.Strings:ehp2.:lm margin=1.
  1974. :li.
  1975. :lm margin=14.BASIC supports two types of strings, fixed-length and dynamic&per.  
  1976. Fixed-length strings are declared with a specific length (between 1 and 32767) 
  1977. and cannot be changed later&per.  Use the following syntax to declare a 
  1978. fixed-length string&colon.
  1979. :li.
  1980. :li.
  1981. :lm margin=14.:hp2.Global:ehp2. :hp1.variableName:ehp1. :hp2.As:ehp2. :hp2.String*:ehp2.:hp1.length:ehp1.:lm margin=1.
  1982. :li.
  1983. :lm margin=14.Dynamic strings have no declared length, and can vary in length 
  1984. from 0 to 32767&per.  The initial length for a dynamic string is 0&per.  Use the 
  1985. following syntax to declare a dynamic string&colon.
  1986. :li.
  1987. :li.
  1988. :lm margin=14.:hp2.Global:ehp2. :hp1.variableName$:ehp1.
  1989. :li.
  1990. or:lm margin=14.:hp2.Global:ehp2. :hp1.variableName:ehp1. :hp2.As:ehp2. :hp2.String:ehp2.:lm margin=1.
  1991. :li.
  1992. :li.
  1993. :lm margin=14.:hp2.Records:ehp2.:lm margin=1.
  1994. :li.
  1995. :lm margin=14.Record variables are declared by using an :hp2.As:ehp2. clause and a :hp1.type:ehp1. 
  1996. which has previously been defined using the :link reftype=hd res=12560.:hp7.Type:ehp7.:elink. statement&per.  The syntax to use 
  1997. is&colon.
  1998. :li.
  1999. :li.
  2000. :lm margin=14.:hp2.Global:ehp2. :hp1.variableName:ehp1. :hp2.As:ehp2. :hp1.typeName:ehp1.:lm margin=1.
  2001. :li.
  2002. :lm margin=14.Records are made up of a collection of data elements called 
  2003. fields&per.  These fields may be of any numeric, string, or previously-defined 
  2004. record type&per.  See :link reftype=hd res=12560.:hp7.Type:ehp7.:elink. for details on accessing fields within a record&per.:lm margin=1.
  2005. :li.
  2006. :lm margin=14.You can not use the :hp2.Global:ehp2. statement to declare a dialog record&per.:lm margin=1.
  2007. :li.
  2008. :li.
  2009. :lm margin=14.:hp2.Arrays:ehp2.:lm margin=1.
  2010. :li.
  2011. :lm margin=14.The available :link reftype=hd res=20100.:hp5.data types:ehp5.:elink. for arrays are&colon. numbers, strings, and 
  2012. records&per.  Arrays of arrays, :link reftype=hd res=20300.:hp5.dialog box records:ehp5.:elink., and :link reftype=hd res=20200.:hp5.ADTs:ehp5.:elink. are not supported&per.:lm margin=1.
  2013. :li.
  2014. :lm margin=14.Array variables are declared by including a subscript list  as 
  2015. part of the :hp1.variableName:ehp1.&per.  The syntax to use for :hp1.variableName:ehp1.is&colon.
  2016. :li.
  2017. :li.
  2018. :lm margin=14.:hp2.Global:ehp2. :hp1.variable:ehp1.( [ :hp1.subscriptRange:ehp1., &per.&per.&per. ] ) [:hp2.As:ehp2. :hp1.typeName:ehp1.]
  2019. :li.
  2020. :li.
  2021. where :hp1.subscriptRange :ehp1.is of the format&colon.
  2022. :li.
  2023. :li.
  2024. :lm margin=14.[ :hp1.startSubscript:ehp1. :hp2.To:ehp2. ] :hp1.endSubscript:ehp1.:lm margin=1.
  2025. :li.
  2026. :lm margin=14.If :hp1.startSubscript:ehp1. is not specified, 0 is used as the default&per.  The :link reftype=hd res=12073.:hp7.
  2027. Option Base:ehp7.:elink. statement can be used to change the default&per.:lm margin=1.
  2028. :li.
  2029. :lm margin=14.Both the :hp1.startSubscript:ehp1. and the :hp1.endSubscript:ehp1. are valid subscripts 
  2030. for the array&per.  The maximum number of subscripts which may be specified in an 
  2031. array definition is 60&per.  The maximum total size for an array (not counting 
  2032. space for dynamic strings) is 65536 bytes&per.:lm margin=1.
  2033. :li.
  2034. :lm margin=14.If no :hp1.subscriptRange:ehp1. is specified for an array, the array is 
  2035. declared as a dynamic array&per.  In this case, the :link reftype=hd res=12087.:hp7.ReDim:ehp7.:elink. statement must be used to 
  2036. specify the dimensions of the array before the array can be used&per.:lm margin=1.
  2037. :li.
  2038. :esl.
  2039. :h2 x=right y=bottom width=50% height=100% res=11100.GoTo
  2040. :i1 id=ix94.GoTo
  2041. :i2 refid=ix9.GoTo
  2042. :i1 id=ix95.Labels
  2043. :sl compact.
  2044. :hp2.GoTo Statement:ehp2.
  2045. :li.
  2046. :li.
  2047. :hp2.Syntax:ehp2.:lm margin=14.:hp2.GoTo :ehp2.:hp1.label:ehp1.:lm margin=1.
  2048. :li.
  2049. :lm margin=1.:li.
  2050. :li.
  2051. :hp2.Comments:ehp2.:lm margin=14.:hp2.GoTo:ehp2. sends control to a :hp1.label:ehp1.&per.  SBL does not support the use of 
  2052. line numbers&per.:lm margin=1.
  2053. :li.
  2054. :lm margin=14.A :link reftype=fn refid=glos_label.:hp5.label:ehp5.:elink. has the same format as any other BASIC :link reftype=fn refid=glos_name.:hp5.name:ehp5.:elink.&per.  To be 
  2055. recognized as a label, a name must begin in the first column, and be followed 
  2056. immediately by a colon ("&colon.")&per.  Reserved words are not valid labels&per.:lm margin=1.
  2057. :li.
  2058. :lm margin=14.:hp2.GoTo:ehp2. cannot be used to transfer control out of the current 
  2059. function or sub&per.:lm margin=1.
  2060. :li.
  2061. :esl.
  2062. :h2 x=right y=bottom width=50% height=100% res=11150.GroupBox
  2063. :i1 id=ix96.GroupBox
  2064. :i2 refid=ix9.GroupBox
  2065. :i2 refid=ix14.GroupBox
  2066. :sl compact.
  2067. :hp2.GroupBox Statement:ehp2.
  2068. :li.
  2069. :li.
  2070. :hp2.Syntax:ehp2.:lm margin=14.:hp2.GroupBox :ehp2.:hp1.x, y,:ehp1. :hp1.dx, dy, text$:ehp1.:lm margin=1.
  2071. :li.
  2072. :li.
  2073. :hp2.Comments:ehp2.:lm margin=14.The :hp2.GroupBox:ehp2. Statement is used to set up a box that encloses sets 
  2074. of items, such as option boxes and check boxes that you wish to group together 
  2075. in a dialog box&per.  :lm margin=1.
  2076. :li.
  2077. :lm margin=14.The :hp2.GroupBox:ehp2. statement  can only be used between a :link reftype=hd res=10115.:hp7.Begin Dialog:ehp7.:elink. 
  2078. and an :hp2.End Dialog:ehp2. statement&per.:lm margin=1.
  2079. :li.
  2080. :lm margin=14.The :hp1.x:ehp1. and :hp1.y:ehp1. arguments set the position of the group box relative 
  2081. to the upper left corner of the dialog box&per.  :hp1.Dx:ehp1. and :hp1.dy :ehp1.set the width and height 
  2082. of the box&per. :lm margin=1.
  2083. :li.
  2084. :lm margin=14.The:hp1. text$:ehp1. field contains a title that will be embedded in the top 
  2085. border of the group box&per.  Trailing characters will be truncated in text$ is 
  2086. wider than dx&per.  If the text$ argument is an empty string (""), the top border 
  2087. of the group box will be a solid line&per.:lm margin=1.
  2088. :li.
  2089. :esl.
  2090. :h2 x=right y=bottom width=50% height=100% res=11180.Hex$
  2091. :i1 id=ix97.Hex$
  2092. :i2 refid=ix6.Hex$
  2093. :i2 refid=ix3.Hex$
  2094. :i2 refid=ix7.Hex$
  2095. :sl compact.
  2096. :hp2.Hex$ Function:ehp2.
  2097. :li.
  2098. :li.
  2099. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Hex$( :ehp2.:hp1.numeric-expression:ehp1.:hp2. ):ehp2.:lm margin=1.
  2100. :li.
  2101. :li.
  2102. :hp2.Returns:ehp2.:lm margin=14.The :hp2.Hex$:ehp2. function returns a hexadecimal representation of a :hp1.
  2103. numeric-expression:ehp1., as a string&per.  If the numeric expression is an integer, the 
  2104. string will contain up to four hexadecimal digits; otherwise, the expression 
  2105. will be converted to a long integer, and the string may contain up to 8 
  2106. hexadecimal digits&per.:lm margin=1.
  2107. :li.
  2108. :esl.
  2109. :h2 x=right y=bottom width=50% height=100% res=11200.If
  2110. :i1 id=ix98.If
  2111. :i2 refid=ix9.If
  2112. :i1 id=ix99.Then
  2113. :i1 id=ix100.Else
  2114. :i2 refid=ix100.If
  2115. :i1 id=ix101.ElseIf
  2116. :i2 refid=ix90.If
  2117. :sl compact.
  2118. :hp2.If &per.&per.&per. Then &per.&per.&per. Else:ehp2.
  2119. :li.
  2120. :li.
  2121. :hp2.Syntax A:ehp2.:lm margin=14.:hp2.If :ehp2.:hp1.condition:ehp1.:hp2. Then :ehp2.:hp1.then_statement:ehp1.:hp2. [ Else :ehp2.:hp1.else_statement:ehp1.:hp2. :ehp2.:hp2.]:ehp2.:lm margin=1.
  2122. :li.
  2123. :lm margin=14.:hp2.Syntax B :ehp2.:lm margin=28.:hp2.If :lm margin=14.:ehp2.:hp1.condition:ehp1.:hp2. Then:ehp2.:lm margin=1.
  2124. :li.
  2125. :lm margin=14.:lm margin=14.:hp1.statement_block:ehp1.:lm margin=1.
  2126. :li.
  2127. :lm margin=14.:hp2.[ ElseIf :ehp2.:hp1.expression:ehp1.:hp2. Then:ehp2.:lm margin=1.
  2128. :li.
  2129. :lm margin=14.:lm margin=14.:hp1.statement_block:ehp1.:hp2.]&per.&per.&per.:ehp2.:lm margin=1.
  2130. :li.
  2131. :lm margin=14.:hp2.[ Else:ehp2.:lm margin=1.
  2132. :li.
  2133. :lm margin=14.:lm margin=14.:hp1.statement_block :ehp1.:hp2.]:ehp2.:lm margin=1.
  2134. :li.
  2135. :lm margin=14.:hp2.End If:ehp2.:lm margin=1.
  2136. :li.
  2137. :li.
  2138. :hp2.Comments:ehp2.:lm margin=14.The :hp2.If &per.&per.&per. Then &per.&per.&per. Else:ehp2. structure allows you to organize 
  2139. alternative actions into separate blocks of code&per.  The resulting action depends 
  2140. on the logical value of one or more conditions expressed in the structure&per. :lm margin=1.
  2141. :li.
  2142. :lm margin=14.The :hp1.condition:ehp1. can be any expression which is evaluated as TRUE 
  2143. (non-zero) or FALSE (zero)&per.:lm margin=1.
  2144. :li.
  2145. :lm margin=14.In the single-line version of the :hp2.If:ehp2. statement, the :hp1.then_state:ehp1.:hp1.ment:ehp1. 
  2146. and :hp1.else_statement:ehp1. can be any valid single statement&per.  Multiple statements 
  2147. separated by colons (&colon.) are not allowed&per.  When multiple statements are required 
  2148. in either the :hp2.Then:ehp2. or :hp2.Else:ehp2. clauses, use the block version of the :hp2.If:ehp2. statement&per.:lm margin=1.
  2149. :li.
  2150. :lm margin=14.In the block version of the :hp2.If:ehp2. statement, the :hp1.statement_blocks:ehp1. can 
  2151. be made up of zero or more statements, separated by colons (&colon.) or on different 
  2152. lines&per.:lm margin=1.
  2153. :li.
  2154. :esl.
  2155. :h2 x=right y=bottom width=50% height=100% res=11250.$Include
  2156. :i1 id=ix102.$Include
  2157. :i1 id=ix103.Include
  2158. :i2 refid=ix9.$Include
  2159. :i2 refid=ix50.$Include
  2160. :i2 refid=ix51.$Include
  2161. :sl compact.
  2162. :hp2.$Include Metacommand:ehp2.
  2163. :li.
  2164. :li.
  2165. :hp2.Syntax:ehp2.:lm margin=14.:hp2.'$Include&colon. ":ehp2.:hp1.filename:ehp1.:hp2." :ehp2.:lm margin=1.
  2166. :li.
  2167. :li.
  2168. :hp2.Comments:ehp2.:lm margin=14.Tells the compiler to include statements from another file&per.:lm margin=1.
  2169. :li.
  2170. :lm margin=14.Comments which include :link reftype=fn refid=metacommand.:hp5.metacommands:ehp5.:elink. will only be recognized at the 
  2171. beginning of a line&per.  For compatibility with other versions of BASIC, you may 
  2172. use single quotes (') to enclose the :hp1.filename:ehp1.&per.:lm margin=1.
  2173. :li.
  2174. :lm margin=14.A file extension of &per.SBH is suggested for SBL include files&per.  This 
  2175. is only a recommendation, and any other valid file extension may be used&per.:lm margin=1.
  2176. :li.
  2177. :lm margin=14.If no directory or drive is specified, the compiler will search 
  2178. for :hp1.filename:ehp1. on the source file search path&per.:lm margin=1.
  2179. :li.
  2180. :esl.
  2181. :h2 x=right y=bottom width=50% height=100% res=11260.Input$
  2182. :i1 id=ix104.Input$
  2183. :i2 refid=ix3.Input$
  2184. :i2 refid=ix6.Input$
  2185. :i2 refid=ix29.Input$
  2186. :i2 refid=ix15.Input$
  2187. :sl compact.
  2188. :hp2.Input$ Function:ehp2.
  2189. :li.
  2190. :li.
  2191. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Input$ :ehp2.(:hp1.n:ehp1.:hp1.umchars%, :ehp1.[#]:hp1.filenumber%:ehp1.):lm margin=1.
  2192. :li.
  2193. :li.
  2194. :hp2.Returns:ehp2.:lm margin=14.The :hp2.Input$:ehp2. function returns a string containing the characters 
  2195. read&per.  :lm margin=1.
  2196. :li.
  2197. :li.
  2198. :hp2.Comments:ehp2.:lm margin=14.The :hp1.numchars%:ehp1. argument contains the number of characters (bytes) 
  2199. to read from the file&per.  The :hp1.filenumber%:ehp1. argument is an integer expression 
  2200. identifying the open file to read from&per.:lm margin=1.
  2201. :li.
  2202. :lm margin=14.The file pointer is advanced the number of characters read&per.  
  2203. Unlike the :link reftype=hd res=11270.:hp7.Input#:ehp7.:elink. statement,:hp2.Input$:ehp2. returns all characters it reads, including 
  2204. carriage returns, line feeds,and leading spaces&per.:lm margin=1.
  2205. :li.
  2206. :esl.
  2207. :h2 x=right y=bottom width=50% height=100% res=11270.Input #
  2208. :i2 refid=ix15.Input #
  2209. :i2 refid=ix3.Input #
  2210. :i2 refid=ix6.Input #
  2211. :i2 refid=ix29.Input #
  2212. :sl compact.
  2213. :hp2.Input # Statement:ehp2.
  2214. :li.
  2215. :li.
  2216. :hp2.Syntax A:ehp2.:lm margin=14.:hp2.Input :ehp2.[#]:hp2. :ehp2.:hp1.filenumber%, variable, :ehp1.[:hp1.variable:ehp1.]:lm margin=1.
  2217. :li.
  2218. :li.
  2219. :hp2.Syntax B:ehp2. :lm margin=14.:hp2.Input:ehp2. [:hp1.prompt$:ehp1.,] :hp1.variable:ehp1., [:hp1.variable:ehp1.]:lm margin=1.
  2220. :li.
  2221. :li.
  2222. :hp2.Comments:ehp2.:lm margin=14.The :hp2.Input#:ehp2. statement reads data from a sequential file and assigns 
  2223. the data to variables&per.  The :hp1.filenumber% :ehp1.argument is an integer expression 
  2224. identifying the open file to read from&per.   This is the number used in the :link reftype=hd res=12070.:hp7.Open:ehp7.:elink. 
  2225. statement to open the file&per. :hp1.Prompt$:ehp1. is an optional string that can be used to 
  2226. prompt for keyboard input&per.   The:hp1. variable:ehp1. arguments list the variables that are 
  2227. assigned the values read from the file&per. The list of :hp1.variables:ehp1. is separated by 
  2228. commas&per.:lm margin=1.
  2229. :li.
  2230. :lm margin=14.If :hp1.filenumber:ehp1. is not specified, the user is prompted for keyboard 
  2231. input with a "?", unless :hp1.prompt$ :ehp1.is specified&per.:lm margin=1.
  2232. :li.
  2233. :esl.
  2234. :h2 x=right y=bottom width=50% height=100% res=11280.InputBox$
  2235. :i1 id=ix105.InputBox$
  2236. :i2 refid=ix3.InputBox$
  2237. :i2 refid=ix6.InputBox$
  2238. :i2 refid=ix15.InputBox$
  2239. :i2 refid=ix14.InputBox$
  2240. :sl compact.
  2241. :hp2.InputBox$ Function:ehp2.
  2242. :li.
  2243. :li.
  2244. :hp2.Syntax:ehp2.:lm margin=14.:hp2.InputBox$(:ehp2.:hp1.prompt$:ehp1. [:hp1., title$:ehp1. [:hp1., default$:ehp1. [:hp1.,xpos%, ypos%:ehp1.]]]:hp2.) :ehp2.:lm margin=1.
  2245. :li.
  2246. :li.
  2247. :hp2.Comments:ehp2.:lm margin=14.The :hp2.InputBox$:ehp2. function displays a dialog box containing a prompt&per.  
  2248. Once the user has entered text, or made the button choice being prompted for, 
  2249. the contents of the box are returned&per.   :lm margin=1.
  2250. :li.
  2251. :lm margin=14.The :hp1.prompt$:ehp1. argument is a string expression containing the text to 
  2252. be shown in the dialog box&per.  The length of prompt$ is restricted to 255 
  2253. characters&per.  This figure is approximate and depends on the width of the 
  2254. characters used&per.  Note that a carriage return and a line-feed character must be 
  2255. included in :hp1.prompt$:ehp1. if a multiple-line prompt is used&per.  :lm margin=1.
  2256. :li.
  2257. :lm margin=14.The :hp1.title$:ehp1. argument is the caption that appears in the dialog 
  2258. box's title bar&per.  :hp1.Default$:ehp1. is the string expression that will be shown in th 
  2259. edit box as the default response&per.  If either of these arguments is omitted, 
  2260. nothing is displayed&per.:lm margin=1.
  2261. :li.
  2262. :lm margin=14.The :hp1.xpos%:ehp1. and :hp1.ypos%:ehp1. arguments are numeric expressions, specified 
  2263. in dialog box units, that determine the position of the dialog box&per.  :hp1.Xpos% :ehp1.
  2264. determines the horizontal distance between the left edge of the screen and the 
  2265. left border of the dialog box&per.   :hp1.Ypos%:ehp1. determines the horizontal distance from 
  2266. the top of the screen to the dialog box's upper edge&per.  If these arguments are 
  2267. not entered, the dialog box is centered roughly one third of the way down the 
  2268. screen&per.  A horizontal dialog box unit is 1/4 of the average character width in 
  2269. the system font; a vertical dialog box unit is 1/8 of the height of a character 
  2270. in the system font&per.  Note&colon. if you wish to specify the dialog box's position, 
  2271. you must enter both of these arguments&per.  If you enter one without the other, 
  2272. the default positioning is set&per.:lm margin=1.
  2273. :li.
  2274. :lm margin=14.Once the user presses Enter, or selects the OK button, :hp2.InputBox$:ehp2. 
  2275. returns the text contained in the input box&per.  If the user selects Cancel, the :hp2.
  2276. InputBox$:ehp2. function returns a null string&per.:lm margin=1.
  2277. :li.
  2278. :esl.
  2279. :h2 x=right y=bottom width=50% height=100% res=11300.InStr
  2280. :i1 id=ix106.InStr
  2281. :i2 refid=ix6.InStr
  2282. :i2 refid=ix3.InStr
  2283. :sl compact.
  2284. :hp2.InStr Function:ehp2.
  2285. :li.
  2286. :li.
  2287. :hp2.Syntax:ehp2.:lm margin=14.:hp2.InStr ( :ehp2.[:hp1.position%:ehp1.:hp2.,:ehp2.]:hp2. :ehp2.:hp1.string$:ehp1.:hp2., :ehp2.:hp1.substring$:ehp1.:hp2. ):ehp2.:lm margin=1.
  2288. :li.
  2289. :li.
  2290. :hp2.Returns:ehp2.:lm margin=14.The :hp2.InStr:ehp2. function returns an integer representing the position of 
  2291. the first occurrence of a :hp1.substring:ehp1. within another :hp1.string:ehp1.&per.  :lm margin=1.
  2292. :li.
  2293. :li.
  2294. :hp2.Comments:ehp2.:lm margin=14.The :hp1.position% :ehp1.argument indicates the index of the character within :hp1.
  2295. string$ :ehp1.where the search should start&per.  If not specified, the search starts at 
  2296. the beginning of the string (equivalent to a :hp1.position%:ehp1. of 1)&per.  :hp1.String$:ehp1. is the 
  2297. string being searched&per.  :hp1.Substring$:ehp1. is the string being looked for&per.  These 
  2298. arguments may be string variables, string expressions, or string literals&per.:lm margin=1.
  2299. :li.
  2300. :lm margin=14.If the :hp1.position%:ehp1. argument is greater than the length of the 
  2301. substring; if the :hp1.string$:ehp1. argument is a null string; or if the substring$ 
  2302. cannot be located, :hp2.InStr:ehp2. will return a zero&per.  If the :hp1.substring$:ehp1. argument is a 
  2303. null string, then the :hp1.position%:ehp1. argument will be returned&per.:lm margin=1.
  2304. :li.
  2305. :lm margin=14.The index of the first character in a string is 1&per.:lm margin=1.
  2306. :li.
  2307. :esl.
  2308. :h2 x=right y=bottom width=50% height=100% res=11310.lnt
  2309. :i1 id=ix107.Int
  2310. :i2 refid=ix3.lnt
  2311. :i2 refid=ix4.lnt
  2312. :i2 refid=ix7.lnt
  2313. :sl compact.
  2314. :hp2.Int Function:ehp2.
  2315. :li.
  2316. :li.
  2317. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Int (:ehp2.:hp1. numeric-expression :ehp1.:hp2.):ehp2.:lm margin=1.
  2318. :li.
  2319. :li.
  2320. :hp2.Returns:ehp2.:lm margin=14.The :hp2.Int:ehp2. function returns the integer part of a :hp1.numeric-expression:ehp1.&per.:lm margin=1.
  2321. :li.
  2322. :li.
  2323. :hp2.Comments:ehp2.:lm margin=14.The argument given is any :hp1.numeric -expression:ehp1.&per. For positive:hp1. 
  2324. numeric-expressions:ehp1., :hp2.Int:ehp2. removes the fractional part of the expression and 
  2325. returns the integer part only&per.  For negative :hp1.numeric-expressions:ehp1.,  :hp2.Int:ehp2. returns 
  2326. the largest integer less than or equal to the expression&per.  For example,  :hp2.Int :ehp2.
  2327. (6&per.2) returns 6; :hp2.Int:ehp2.(-6&per.2) returns -7&per.  See :link reftype=hd res=10227.:hp7.CInt:ehp7.:elink. and :link reftype=hd res=10730.:hp7.Fix:ehp7.:elink.&per.:lm margin=1.
  2328. :li.
  2329. :esl.
  2330. :h2 x=right y=bottom width=50% height=100% res=11320.Kill
  2331. :i1 id=ix108.Kill
  2332. :i2 refid=ix9.Kill
  2333. :i2 refid=ix29.Kill
  2334. :sl compact.
  2335. :hp2.Kill Statement:ehp2.
  2336. :li.
  2337. :li.
  2338. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Kill :ehp2.:hp1. filespec$:ehp1.:lm margin=1.
  2339. :li.
  2340. :li.
  2341. :hp2.Comments:ehp2.:lm margin=14.:hp2.Kill:ehp2. deletes files from disk&per.  The argument :hp1.filesp:ehp1.:hp1.ec$:ehp1. is a string 
  2342. expression that specifies a valid DOS file specification&per.  This specification 
  2343. can contain paths and wildcards&per.  :hp2.Kill:ehp2. deletes files only, not directories&per.  
  2344. Use the :link reftype=hd res=12110.:hp7.RmDir:ehp7.:elink. function to delete directories&per.:lm margin=1.
  2345. :li.
  2346. :esl.
  2347. :h2 x=right y=bottom width=50% height=100% res=11360.LBound
  2348. :i1 id=ix109.LBound
  2349. :i2 refid=ix3.LBound
  2350. :i2 refid=ix66.LBound
  2351. :sl compact.
  2352. :hp2.LBound Function:ehp2.
  2353. :li.
  2354. :li.
  2355. :hp2.Syntax:ehp2.:lm margin=14.:hp2.LBound ( :ehp2.:hp1.arrayVariable:ehp1. [, :hp1.dimension:ehp1. ]:hp2. ):ehp2.:lm margin=1.
  2356. :li.
  2357. :li.
  2358. :hp2.Returns:ehp2.:lm margin=14.The LBound function returns the lower bound of the subscript range 
  2359. for the specified :hp1.dimension:ehp1. of the :hp1.arrayVariable:ehp1.&per.  :lm margin=1.
  2360. :li.
  2361. :li.
  2362. :hp2.Comments:ehp2.:lm margin=14.The dimensions of an array are numbered starting with 1&per.  If the :hp1.
  2363. dimension:ehp1. is not specified, 1 is used as a default&per.  :lm margin=1.
  2364. :li.
  2365. :lm margin=14.:hp2.LBound:ehp2. can be used with  :link reftype=hd res=12580.:hp7.UBound:ehp7.:elink. to determine the length of an 
  2366. array&per.:lm margin=1.
  2367. :li.
  2368. :esl.
  2369. :h2 x=right y=bottom width=50% height=100% res=11400.LCase$
  2370. :i1 id=ix110.LCase$
  2371. :i2 refid=ix6.LCase$
  2372. :i2 refid=ix3.LCase$
  2373. :sl compact.
  2374. :hp2.LCase$ Function:ehp2.
  2375. :li.
  2376. :li.
  2377. :hp2.Syntax:ehp2.:lm margin=14.:hp2.LCase$ ( :ehp2.:hp1.string$ :ehp1.:hp2.):ehp2.:lm margin=1.
  2378. :li.
  2379. :li.
  2380. :hp2.Returns:ehp2.:lm margin=14.The :hp2.LCase$:ehp2. function returns a copy of the source :hp1.string:ehp1., with all 
  2381. upper case letters converted to lower case&per.  :lm margin=1.
  2382. :li.
  2383. :li.
  2384. :hp2.Comments:ehp2.:lm margin=14.The translation is based on the country specified in the Windows 
  2385. Control Panel&per.:lm margin=1.
  2386. :li.
  2387. :esl.
  2388. :h2 x=right y=bottom width=50% height=100% res=11500.Left$
  2389. :i1 id=ix111.Left$
  2390. :i2 refid=ix6.Left$
  2391. :i2 refid=ix3.Left$
  2392. :sl compact.
  2393. :hp2.Left$ Function:ehp2.
  2394. :li.
  2395. :li.
  2396. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Left$ ( :ehp2.:hp1.string$:ehp1.:hp2., :ehp2.:hp1.length%:ehp1.:hp2.):ehp2.:lm margin=1.
  2397. :li.
  2398. :li.
  2399. :hp2.Returns:ehp2.:lm margin=14.The :hp2.Left$:ehp2. function returns a string of a specified :hp1.length:ehp1. copied 
  2400. from the beginning of the source :hp1.string:ehp1.&per.:lm margin=1.
  2401. :li.
  2402. :li.
  2403. :hp2.Comments:ehp2.:lm margin=14.If the length of :hp1.string$:ehp1. is less than :hp1.length%:ehp1., :hp2.Left$:ehp2. returns the 
  2404. whole string&per.:lm margin=1.
  2405. :li.
  2406. :esl.
  2407. :h2 x=right y=bottom width=50% height=100% res=11600.Len
  2408. :i1 id=ix112.Len
  2409. :i2 refid=ix6.Len
  2410. :i2 refid=ix3.Len
  2411. :sl compact.
  2412. :hp2.Len Function:ehp2.
  2413. :li.
  2414. :li.
  2415. :hp2.Syntax A:ehp2.:lm margin=14.:hp2.Len ( :ehp2.:hp1.string$:ehp1.:hp2. ):ehp2.:lm margin=1.
  2416. :li.
  2417. :li.
  2418. :hp2.Syntax B:ehp2.:lm margin=14.:hp2.Len ( :ehp2.:hp1.non-string:ehp1.:hp2. ):ehp2.:lm margin=1.
  2419. :li.
  2420. :li.
  2421. :hp2.Returns:ehp2.:lm margin=14.The :hp2.Len:ehp2. function returns the length of the argument&per.  The argument 
  2422. can be of any type; if the argument is a string, the number of characters in 
  2423. the string is returned; otherwise, the length of the built-in datatype or 
  2424. user-defined type is returned&per.:lm margin=1.
  2425. :li.
  2426. :esl.
  2427. :h2 x=right y=bottom width=50% height=100% res=11700.Let
  2428. :i1 id=ix113.Let
  2429. :i1 id=ix114.Assignment
  2430. :i2 refid=ix9.Let
  2431. :sl compact.
  2432. :hp2.Let (Assignment Statement):ehp2.
  2433. :li.
  2434. :li.
  2435. :hp2.Syntax:ehp2.:lm margin=14.:hp2.[ Let ] :ehp2.:hp1.variable :ehp1.:hp2.= :ehp2.:hp1.expression:ehp1.:lm margin=1.
  2436. :li.
  2437. :li.
  2438. :hp2.Comments:ehp2.:lm margin=14.An assignment statement stores a value in a BASIC :hp1.variable:ehp1.&per.  The 
  2439. keyword :hp2.Let:ehp2. is optional&per.:lm margin=1.
  2440. :li.
  2441. :lm margin=14.The :hp2.Let:ehp2. statement can be used to assign to a numeric, string or 
  2442. record variable&per.  You can also use the :hp2.Let:ehp2. statement to assign to a record 
  2443. field or to an element of an array&per.:lm margin=1.
  2444. :li.
  2445. :lm margin=14.When assigning a value to a numeric or string variable, :link reftype=fn refid=typeConversion.:hp5.standard 
  2446. conversion rules:ehp5.:elink. apply&per. :lm margin=1.
  2447. :li.
  2448. :esl.
  2449. :h2 x=right y=bottom width=50% height=100% res=11710.Line Input #
  2450. :i1 id=ix115.Line Input#
  2451. :i2 refid=ix9.Line Input #
  2452. :i2 refid=ix15.Line Input #
  2453. :i2 refid=ix29.Line Input #
  2454. :sl compact.
  2455. :hp2.Line Input # Statement:ehp2.
  2456. :li.
  2457. :li.
  2458. :hp2.Syntax A:ehp2.:lm margin=14.:hp2.Line Input :ehp2.[#]:hp2. :ehp2.:hp1.filenumber%, variable$:ehp1.:lm margin=1.
  2459. :li.
  2460. :li.
  2461. :hp2.Syntax B:ehp2.:lm margin=14.:hp2.Line Inpu:ehp2.:hp2.t:ehp2. [:hp1.prompt$:ehp1.,] :hp1.variables:ehp1.:lm margin=1.
  2462. :li.
  2463. :li.
  2464. :hp2.Comments:ehp2.:lm margin=14.The :hp2.Line Input#:ehp2. statement reads a line from a sequential file into 
  2465. a string variable&per.  The :hp1.filenumber% :ehp1.argument is an integer expression 
  2466. identifying the open file to read from&per.   This is the number used in the :link reftype=hd res=12070.:hp7.Open:ehp7.:elink. 
  2467. statement to open the file&per. :hp1.Prompt$:ehp1. is an optional string that can be used to 
  2468. prompt for keyboard input&per.   The:hp1. variable$:ehp1. argument is a string variables into 
  2469. which the line from the input file is read&per.:lm margin=1.
  2470. :li.
  2471. :lm margin=14.If :hp1.filenumber:ehp1. is not specified, the user is prompted for keyboard 
  2472. input with a "?", unless :hp1.prompt$ :ehp1.is specified&per.:lm margin=1.
  2473. :li.
  2474. :esl.
  2475. :h2 x=right y=bottom width=50% height=100% res=11715.ListBox
  2476. :i1 id=ix116.ListBox
  2477. :i2 refid=ix9.ListBox
  2478. :i2 refid=ix14.ListBox
  2479. :sl compact.
  2480. :hp2.ListBox Statement:ehp2.
  2481. :li.
  2482. :li.
  2483. :hp2.Syntax:ehp2.:lm margin=14.:hp2.ListBox :ehp2.:hp1.x, y,:ehp1. :hp1.dx, dy, text$, &per.field:ehp1.:lm margin=1.
  2484. :li.
  2485. :li.
  2486. :hp2.Comments:ehp2.:lm margin=14.The ListBox statement is used to create a list of choices&per.  :lm margin=1.
  2487. :li.
  2488. :lm margin=14.The :hp1.x:ehp1. and :hp1.y:ehp1. arguments give the coordinates that the upper left 
  2489. corner of the list box, relative to the upper left corner of the dialog box&per.  
  2490. The :hp1.x:ehp1. argument is measured in 1/4 system-font character-width units&per.  The :hp1.y :ehp1.
  2491. argument is measured in 1/8 system-font character-width units&per. (See :link reftype=hd res=10115.:hp7.Begin Dialog:ehp7.:elink.
  2492. &per.) :lm margin=1.
  2493. :li.
  2494. :lm margin=14.The :hp2.ListBox:ehp2. statement  can only be used between a :link reftype=hd res=10115.:hp7.Begin Dialog:ehp7.:elink. and 
  2495. an :hp2.End Dialog:ehp2. statement&per.:lm margin=1.
  2496. :li.
  2497. :lm margin=14.The:hp1. dx :ehp1.and:hp1. dy :ehp1.arguments specify the width and height of the list 
  2498. box&per.:lm margin=1.
  2499. :li.
  2500. :lm margin=14.The:hp1. text$:ehp1. argument is a string containing the selections for the 
  2501. list box&per.  This string must be defined, using a :link reftype=hd res=10600.:hp7.Dim:ehp7.:elink. Statement, before the :link reftype=hd res=10115.:hp7.Begin 
  2502. Dialog:ehp7.:elink. statement is executed&per.  The arguments in the :hp1.text$:ehp1. string are entered as 
  2503. shown in this example&colon.:lm margin=1.
  2504. :li.
  2505. :lm margin=14.:lm margin=14.:hp1.dimname:ehp1. = ":hp1.listchoice:ehp1."+Chr$(9)+":hp1.listchoice:ehp1."+Chr$(9)
  2506. :li.
  2507. :lm margin=28.+":lm margin=14.:hp1.listchoice:ehp1."+Chr$(9)&per.&per.&per.:lm margin=1.
  2508. :li.
  2509. :lm margin=14.Where :hp1.dimname:ehp1. is the name of a :hp2.String:ehp2. variable defined in a :link reftype=hd res=10600.:hp7.Dim:ehp7.:elink. 
  2510. Statement, :hp1.listchoice:ehp1. is the text that will appear as a selection in the list 
  2511. box, and :hp2.Chr$(:ehp2.9:hp2.):ehp2. is the function call that produces a tab character&per.  Note that 
  2512. multiple selections may be specified in:hp1. text$ :ehp1.by separating the:hp1. listchoices:ehp1. 
  2513. with tab characters, as shown above&per.:lm margin=1.
  2514. :li.
  2515. :lm margin=14.The :hp1.&per.field :ehp1.argument is the name of the dialog-record field that 
  2516. will hold the selection made from the list box&per.  When the user selects OK (or 
  2517. selects the customized button created using the :link reftype=hd res=10120.:hp7.Button:ehp7.:elink. statement), a number 
  2518. representing the selection's position in the :hp1.text$:ehp1. string is recorded in the  
  2519. field designated by the :hp1.&per.field :ehp1.argument&per.  The numbers begin at 0&per.  If no item 
  2520. is selected, it is -1&per.:lm margin=1.
  2521. :li.
  2522. :esl.
  2523. :h2 x=right y=bottom width=50% height=100% res=11720.Lof
  2524. :i1 id=ix117.Lof
  2525. :i2 refid=ix3.Lof
  2526. :i2 refid=ix29.Lof
  2527. :sl compact.
  2528. :hp2.Lof Function:ehp2.
  2529. :li.
  2530. :li.
  2531. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Lof :ehp2.(:hp1.filenumber%:ehp1.):lm margin=1.
  2532. :li.
  2533. :li.
  2534. :hp2.Returns:ehp2.:lm margin=14.The :hp2.Lof:ehp2. Function returns the length in bytes of the file specified 
  2535. by :hp1.filenumber%&per.:ehp1.:lm margin=1.
  2536. :li.
  2537. :li.
  2538. :hp2.Comments:ehp2.:lm margin=14.:hp1.Filenumber%:ehp1. is an integer expression identifying the open file 
  2539. from which the file length will be read&per.  The :hp1.filenumber%:ehp1. is the number used in 
  2540. the :link reftype=hd res=12070.:hp7.Open:ehp7.:elink. statement of the file&per.:lm margin=1.
  2541. :li.
  2542. :esl.
  2543. :h2 x=right y=bottom width=50% height=100% res=11730.Log
  2544. :i1 id=ix118.Log
  2545. :i2 refid=ix3.Log
  2546. :i2 refid=ix83.Log
  2547. :sl compact.
  2548. :hp2.Log Function:ehp2.
  2549. :li.
  2550. :li.
  2551. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Log( :ehp2.:hp1.numeric-expression:ehp1.:hp2. ):ehp2.:lm margin=1.
  2552. :li.
  2553. :li.
  2554. :hp2.Returns:ehp2.:lm margin=14.The :hp2.Log:ehp2. function returns the value natural logarith of :hp1.
  2555. numeric-expression:ehp1.&per.:lm margin=1.
  2556. :li.
  2557. :li.
  2558. :hp2.Comment:ehp2.:lm margin=14.The return value is single-precision for an integer or 
  2559. single-precision numeric expression, double precision for a long or 
  2560. double-precision numeric expression&per.:lm margin=1.
  2561. :li.
  2562. :esl.
  2563. :h2 x=right y=bottom width=50% height=100% res=11800.LTrim$
  2564. :i1 id=ix119.LTrim$
  2565. :i2 refid=ix6.LTrim$
  2566. :i2 refid=ix3.LTrim$
  2567. :sl compact.
  2568. :hp2.LTrim$ Function:ehp2.
  2569. :li.
  2570. :li.
  2571. :hp2.Syntax:ehp2.:lm margin=14.:hp2.LTrim$ ( :ehp2.:hp1.string$:ehp1.:hp2. ):ehp2.:lm margin=1.
  2572. :li.
  2573. :li.
  2574. :hp2.Returns:ehp2.:lm margin=14.The :hp2.LTrim$:ehp2. function returns a copy of the source :hp1.string:ehp1., with all 
  2575. leading space characters removed&per.:lm margin=1.
  2576. :li.
  2577. :esl.
  2578. :h2 x=right y=bottom width=50% height=100% res=11890.Mid Statement
  2579. :i1 id=ix120.Mid Statement
  2580. :i2 refid=ix6.Mid Statement
  2581. :i2 refid=ix3.Mid Statement
  2582. :sl compact.
  2583. :hp2.Mid Statement:ehp2.
  2584. :li.
  2585. :li.
  2586. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Mid (:ehp2.:hp1.string$:ehp1.:hp2., :ehp2.:hp1.position%:ehp1.[:hp2., :ehp2.:hp1.length%:ehp1.]:hp1. :ehp1.:hp2.) = :ehp2.:hp1.subst-string$:ehp1.:lm margin=1.
  2587. :li.
  2588. :li.
  2589. :hp2.Returns:ehp2.:lm margin=14.The :hp2.Mid$:ehp2. statement replaces the specified substring in :hp1.string$:ehp1. 
  2590. with :hp1.subst-string$:ehp1.&per.:lm margin=1.
  2591. :li.
  2592. :li.
  2593. :hp2.Comment:ehp2.:lm margin=14.If the :hp1.length%:ehp1. argument is left out, or if there are fewer 
  2594. characters in a string than specified in :hp1.length%:ehp1., then :hp2.Mid$:ehp2. will replace all 
  2595. the characters from the :hp1.position%:ehp1. to the end of the string&per.  If :hp1.position%:ehp1. is 
  2596. larger than the number of characters in the indicated :hp1.string$:ehp1., then :hp2.Mid$:ehp2. 
  2597. appends :hp1.subst-string%:ehp1. to :hp1.string$&per.:ehp1.:lm margin=1.
  2598. :li.
  2599. :lm margin=14.The index of the first character in a string is 1&per.:lm margin=1.
  2600. :li.
  2601. :esl.
  2602. :h2 x=right y=bottom width=50% height=100% res=11900.Mid$
  2603. :i1 id=ix121.Mid$
  2604. :i2 refid=ix6.Mid$
  2605. :i2 refid=ix3.Mid$
  2606. :sl compact.
  2607. :hp2.Mid$ Function:ehp2.
  2608. :li.
  2609. :li.
  2610. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Mid$ ( :ehp2.:hp1.string$:ehp1.:hp2., :ehp2.:hp1.position%:ehp1.[:hp2., :ehp2.:hp1.length%:ehp1.]:hp1. :ehp1.:hp2.):ehp2.:lm margin=1.
  2611. :li.
  2612. :li.
  2613. :hp2.Returns:ehp2.:lm margin=14.The :hp2.Mid$:ehp2. function returns a substring of a specified :hp1.length%:ehp1. from 
  2614. a source :hp1.string$:ehp1., starting with the character at the specified :hp1.position%:ehp1.&per.:lm margin=1.
  2615. :li.
  2616. :li.
  2617. :hp2.Comment:ehp2.:lm margin=14.If the :hp1.length%:ehp1. argument is left out, or if there are fewer 
  2618. characters in a string than specified in :hp1.length%:ehp1., then :hp2.Mid$:ehp2. will return all the 
  2619. characters from the :hp1.position%:ehp1. to the end of the string&per.  If :hp1.position%:ehp1. is larger 
  2620. than the number of characters in the indicated :hp1.string$:ehp1., then :hp2.Mid$:ehp2. returns a 
  2621. null string&per.:lm margin=1.
  2622. :li.
  2623. :lm margin=14.The index of the first character in a string is 1&per.:lm margin=1.
  2624. :li.
  2625. :lm margin=14.To modify a portion of a string value, see :link reftype=hd res=11890.:hp7.Mid Statement:ehp7.:elink.:lm margin=1.
  2626. :li.
  2627. :esl.
  2628. :h2 x=right y=bottom width=50% height=100% res=11910.MkDir
  2629. :i1 id=ix122.MkDir
  2630. :i2 refid=ix3.MkDir
  2631. :i2 refid=ix28.MkDir
  2632. :i2 refid=ix29.MkDir
  2633. :sl compact.
  2634. :hp2.MkDir Statement:ehp2.
  2635. :li.
  2636. :li.
  2637. :hp2.Syntax:ehp2.:lm margin=14.:hp2.MkDir :ehp2.:hp1.pathname$:ehp1.:hp2. :ehp2.:lm margin=1.
  2638. :li.
  2639. :li.
  2640. :hp2.Comments:ehp2.:lm margin=14.The :hp2.MkDir:ehp2. function makes a new directory&per.:lm margin=1.
  2641. :li.
  2642. :lm margin=14.:hp1.Pathname$ :ehp1.is a string expression identifying the new default 
  2643. directory&per.  The syntax for :hp1.pathname$:ehp1. is&colon.:lm margin=1.
  2644. :li.
  2645. :lm margin=14.:lm margin=14.[:hp1.drive:ehp1.&colon.] [\] :hp1.directory:ehp1. [\:hp1.directory:ehp1.]:lm margin=1.
  2646. :li.
  2647. :lm margin=14.The:hp1. drive:ehp1. argument is optional&per.  If omitted, :hp2.MkDir:ehp2. makes a new 
  2648. directory on the current drive&per.  The:hp1. directory:ehp1. argument is a directory name&per.:lm margin=1.
  2649. :li.
  2650. :esl.
  2651. :h2 x=right y=bottom width=50% height=100% res=12000.MsgBox Function
  2652. :i1 id=ix123.MsgBox
  2653. :i2 refid=ix123.MsgBox Function
  2654. :i2 refid=ix15.MsgBox Function
  2655. :i2 refid=ix3.MsgBox Function
  2656. :i2 refid=ix14.MsgBox Function
  2657. :sl compact.
  2658. :hp2.Msgbox Function:ehp2.
  2659. :li.
  2660. :li.
  2661. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Msgbox( :ehp2.:hp1.message$:ehp1.[:hp1.,type%:ehp1.[, :hp1.caption$:ehp1.] ] :hp2.):ehp2.:lm margin=1.
  2662. :li.
  2663. :li.
  2664. :hp2.Returns:ehp2.:lm margin=14.The function returns an integer value indicating which button the 
  2665. user selected&per.:lm margin=1.
  2666. :li.
  2667. :li.
  2668. :hp2.Comments:ehp2.:lm margin=14.The :hp2.Msgbox:ehp2. function displays a :hp1.message :ehp1.in a dialog box:hp1.&per.:ehp1.(The 
  2669. message displayed must be no more than 1024 characters long&per.  A message string 
  2670. greater than 255 characters without intervening spaces will be truncated after 
  2671. the 255th character&per.)   Once the user has selected a pushbutton, :hp2.Msgbox:ehp2. returns 
  2672. a value indicating the user's choice&per.:lm margin=1.
  2673. :li.
  2674. :lm margin=14.The :hp1.type%:ehp1. argument governs the icons and buttons that will be 
  2675. displayed in the dialog box&per.  This argument is the sum of values describing the 
  2676. number and type of radio buttons which will appear, the icon style, and the 
  2677. default button&per.  One selection should be made from each group&per.:lm margin=1.
  2678. :li.
  2679. :lm margin=14.:lm margin=14.:hp7.Value:ehp7.:lm margin=33.:hp7.Description:lm margin=14.:ehp7.:lm margin=1.
  2680. :li.
  2681. :lm margin=14.:hp2.Group 1:ehp2.:lm margin=31. :lm margin=14.    0:lm margin=41.OK :lm margin=14.only
  2682. :li.
  2683. :hp2.Buttons:ehp2.:lm margin=14.     1:lm margin=31.OK, :lm margin=14.Cancel 
  2684. :li.
  2685. :lm margin=14.     2:lm margin=31.Abort, :lm margin=14.Retry, Ignore
  2686. :li.
  2687. :lm margin=14.     3:lm margin=31.Yes, :lm margin=14.No, Cancel s
  2688. :li.
  2689. :lm margin=14.     4:lm margin=31.Yes, :lm margin=14.No 
  2690. :li.
  2691. :lm margin=14.     5:lm margin=31.Retry, :lm margin=14.Cancel :lm margin=1.
  2692. :li.
  2693. :lm margin=14.:hp2.Group 2:ehp2.:lm margin=31. :lm margin=14.   16:lm margin=41.Critical :lm margin=14.Message ( STOP )
  2694. :li.
  2695.  :hp2.Icons:ehp2.:lm margin=14.      32:lm margin=31.Warning :lm margin=14.Query  ( ? )
  2696. :li.
  2697. :lm margin=14.   48:lm margin=31.Warning :lm margin=14.Message ( ! )
  2698. :li.
  2699. :lm margin=14.    64:lm margin=31.Information :lm margin=14.Message  ( i ):lm margin=1.
  2700. :li.
  2701. :lm margin=14.:hp2.Group 3:ehp2.:lm margin=31. :lm margin=14.    0:lm margin=41.First :lm margin=14.button
  2702. :li.
  2703. :hp2.Defaults:ehp2.:lm margin=14.   256:lm margin=31.Second :lm margin=14.button
  2704. :li.
  2705. :lm margin=14.   512:lm margin=31.Third :lm margin=14.button:lm margin=1.
  2706. :li.
  2707. :lm margin=14.If :hp1.type%:ehp1. is omitted, a single OK button will appear&per.:lm margin=1.
  2708. :li.
  2709. :lm margin=14.:hp1.Caption% :ehp1.is a string expression that will appear in the dialog 
  2710. box's title bar&per.   :lm margin=1.
  2711. :li.
  2712. :lm margin=14.The return values for the Msgbox function are&colon.:lm margin=1.
  2713. :li.
  2714. :lm margin=28.:hp7.Value:ehp7.:lm margin=45.:hp7.Button :lm margin=28.Pressed:ehp7.:lm margin=1.
  2715. :li.
  2716. :lm margin=14.:lm margin=14.1:lm margin=31.OK :lm margin=14.
  2717. :li.
  2718. :lm margin=14.     2:lm margin=31.Cancel:lm margin=14.
  2719. :li.
  2720. :lm margin=14.     3:lm margin=31.Abort:lm margin=14.
  2721. :li.
  2722. :lm margin=14.     4:lm margin=31.Retry:lm margin=14.
  2723. :li.
  2724. :lm margin=14.     5:lm margin=31.Ignore:lm margin=14.
  2725. :li.
  2726. :lm margin=14.     6:lm margin=31.Yes:lm margin=14.
  2727. :li.
  2728. :lm margin=14.     7:lm margin=31.No:lm margin=14.:lm margin=1.
  2729. :li.
  2730. :esl.
  2731. :h2 x=right y=bottom width=50% height=100% res=12010.MsgBox Statement
  2732. :i2 refid=ix123.MsgBox Statement
  2733. :i2 refid=ix15.MsgBox Statement
  2734. :i2 refid=ix14.MsgBox Statement
  2735. :i2 refid=ix9.MsgBox Statement
  2736. :sl compact.
  2737. :hp2.Msgbox Statement:ehp2.
  2738. :li.
  2739. :li.
  2740. :hp2.Syntax:ehp2.:lm margin=14.:hp2.MsgBox :ehp2.:hp1.message$:ehp1.[ :hp1.,type%:ehp1.[ , :hp1.caption$:ehp1.] ]:lm margin=1.
  2741. :li.
  2742. :li.
  2743. :hp2.Comments:ehp2.:lm margin=14.The :hp2.Msgbox:ehp2. statement displays a :hp1.message:ehp1. in a dialog box&per.  A 
  2744. message can be no longer than 1024 characters in length&per.  Messages longer than 
  2745. 255 characters which contain no intervening spaces will be truncated after the 
  2746. 255th character&per.:lm margin=1.
  2747. :li.
  2748. :lm margin=14.The :hp1.type%:ehp1. argument governs the icons and buttons that will be 
  2749. displayed in the dialog box&per.  This argument is the sum of values describing the 
  2750. number and type of radio buttons which will appear, the icon style, and the 
  2751. default button&per.  One selection should be made from each group&per.:lm margin=1.
  2752. :li.
  2753. :lm margin=14.:lm margin=14.:hp7.Value:ehp7.:lm margin=33.:hp7.Description:lm margin=14.:ehp7.:lm margin=1.
  2754. :li.
  2755. :lm margin=14.:hp2.Group 1:ehp2.:lm margin=31. :lm margin=14.    0:lm margin=41.OK :lm margin=14.only
  2756. :li.
  2757. :hp2.Buttons:ehp2.:lm margin=14.     1:lm margin=31.OK, :lm margin=14.Cancel 
  2758. :li.
  2759. :lm margin=14.     2:lm margin=31.Abort, :lm margin=14.Retry, Ignore
  2760. :li.
  2761. :lm margin=14.     3:lm margin=31.Yes, :lm margin=14.No, Cancel s
  2762. :li.
  2763. :lm margin=14.     4:lm margin=31.Yes, :lm margin=14.No 
  2764. :li.
  2765. :lm margin=14.     5:lm margin=31.Retry, :lm margin=14.Cancel :lm margin=1.
  2766. :li.
  2767. :lm margin=14.:hp2.Group 2:ehp2.:lm margin=31. :lm margin=14.   16:lm margin=41.Critical :lm margin=14.Message ( STOP )
  2768. :li.
  2769.  :hp2.Icons:ehp2.:lm margin=14.      32:lm margin=31.Warning :lm margin=14.Query  ( ? )
  2770. :li.
  2771. :lm margin=14.   48:lm margin=31.Warning :lm margin=14.Message ( ! )
  2772. :li.
  2773. :lm margin=14.    64:lm margin=31.Information :lm margin=14.Message  ( i ):lm margin=1.
  2774. :li.
  2775. :lm margin=14.:hp2.Group 3:ehp2.:lm margin=31. :lm margin=14.    0:lm margin=41.First :lm margin=14.button
  2776. :li.
  2777. :hp2.Defaults:ehp2.:lm margin=14.   256:lm margin=31.Second :lm margin=14.button
  2778. :li.
  2779. :lm margin=14.   512:lm margin=31.Third :lm margin=14.button:lm margin=1.
  2780. :li.
  2781. :lm margin=14.If :hp1.type%:ehp1. is omitted, a single OK button will appear&per.:lm margin=1.
  2782. :li.
  2783. :lm margin=14.:hp1.Caption% :ehp1.is a string expression that will appear in the dialog 
  2784. box's title bar&per.   :lm margin=1.
  2785. :li.
  2786. :esl.
  2787. :h2 x=right y=bottom width=50% height=100% res=12020.Name
  2788. :i1 id=ix124.Name
  2789. :i2 refid=ix9.Name
  2790. :i2 refid=ix29.Name
  2791. :i2 refid=ix28.Name
  2792. :sl compact.
  2793. :hp2.Name Statement:ehp2.
  2794. :li.
  2795. :li.
  2796. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Name :ehp2.:hp1.oldfilename$ :ehp1.:hp2.As :ehp2.:hp1.newfilename$:ehp1.:lm margin=1.
  2797. :li.
  2798. :li.
  2799. :hp2.Comments:ehp2.:lm margin=14.The  :hp2.Name:ehp2. statement renames a file&per.  It can also be used to move a 
  2800. file from one directory to another&per.  :lm margin=1.
  2801. :li.
  2802. :lm margin=14.:hp1.Oldfilename$:ehp1. and :hp1.newfilename$ :ehp1.are string expressions that 
  2803. designate, respectively, the file to rename and the new name for that file&per.  A 
  2804. path may be part of the :hp1.filename$:ehp1.&per.   If the paths are different, the file is 
  2805. moved to the new directory&per.:lm margin=1.
  2806. :li.
  2807. :lm margin=14.If the file :hp1.oldfilename$:ehp1. is open, BASIC generates an error 
  2808. message&per.  A file must be closed in order to be renamed&per.  If the file :hp1.
  2809. newfilename$:ehp1. already exists, BASIC will generate an error message&per.:lm margin=1.
  2810. :li.
  2811. :esl.
  2812. :h2 x=right y=bottom width=50% height=100% res=12050.NoCStrings
  2813. :i1 id=ix125.$NoCStrings
  2814. :i2 refid=ix49.NoCStrings
  2815. :i1 id=ix126.CStrings
  2816. :i2 refid=ix48.NoCStrings
  2817. :i2 refid=ix50.NoCStrings
  2818. :i2 refid=ix9.NoCStrings
  2819. :i2 refid=ix51.NoCStrings
  2820. :sl compact.
  2821. :hp2.$NoCStrings Metacommand:ehp2.
  2822. :li.
  2823. :li.
  2824. :hp2.Syntax:ehp2.:lm margin=14.:hp2.'$NOCSTRINGS:ehp2.:lm margin=1.
  2825. :li.
  2826. :li.
  2827. :hp2.Comments:ehp2.:lm margin=14.The :hp2.$NoCStrings :ehp2.metacommand tells the compiler to treat a 
  2828. backslash inside a string as a normal character&per.  This is the default&per.:lm margin=1.
  2829. :li.
  2830. :lm margin=14.You can use the :link reftype=hd res=10450.:hp7.$CStrings:ehp7.:elink. metacommand to tell the compiler to 
  2831. treat a backslash character inside of a string as an escape character&per.:lm margin=1.
  2832. :li.
  2833. :esl.
  2834. :h2 x=right y=bottom width=50% height=100% res=12053.Oct$
  2835. :i1 id=ix127.Oct$
  2836. :i2 refid=ix6.Oct$
  2837. :i2 refid=ix3.Oct$
  2838. :i2 refid=ix7.Oct$
  2839. :sl compact.
  2840. :hp2.Oct$ Function:ehp2.
  2841. :li.
  2842. :li.
  2843. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Oct$( :ehp2.:hp1.numeric-expression:ehp1.:hp2. ):ehp2.:lm margin=1.
  2844. :li.
  2845. :li.
  2846. :hp2.Returns:ehp2.:lm margin=14.The :hp2.Oct$:ehp2. function returns an octal representation of a :hp1.
  2847. numeric-expression:ehp1., as a string&per.  If the numeric expression is an integer, the 
  2848. string will contain up to six octal digits; otherwise, the expression will be 
  2849. converted to a long integer, and the string may contain up to 11 octal digits&per.:lm margin=1.
  2850. :li.
  2851. :esl.
  2852. :h2 x=right y=bottom width=50% height=100% res=12055.OkButton
  2853. :i1 id=ix128.OkButton
  2854. :i2 refid=ix17.OkButton
  2855. :i2 refid=ix9.OkButton
  2856. :i2 refid=ix14.OkButton
  2857. :sl compact.
  2858. :hp2.OkButton Statement:ehp2.
  2859. :li.
  2860. :li.
  2861. :hp2.Syntax:ehp2.:lm margin=14.:hp2.OK :ehp2.:hp1.x, y,:ehp1. :hp1.dx, dy:ehp1.:lm margin=1.
  2862. :li.
  2863. :li.
  2864. :hp2.Comments:ehp2.:lm margin=14.The :hp2.OkButton:ehp2. Statement determines the position and size of an OK 
  2865. button&per.:lm margin=1.
  2866. :li.
  2867. :lm margin=14.The :hp2.OkButton:ehp2. statement  can only be used between a :link reftype=hd res=10115.:hp7.Begin Dialog:ehp7.:elink. 
  2868. and an :hp2.End Dialog:ehp2. statement&per.:lm margin=1.
  2869. :li.
  2870. :lm margin=14.The :hp1.x:ehp1. and :hp1.y:ehp1. arguments set the position of the OK button relative 
  2871. to the upper left corner of the dialog box&per.  :hp1.Dx:ehp1. and :hp1.dy :ehp1.set the width and height 
  2872. of the button&per.  A:hp1. dy:ehp1. value of 14 typically accommodates text in the system 
  2873. font&per. :lm margin=1.
  2874. :li.
  2875. :esl.
  2876. :h2 x=right y=bottom width=50% height=100% res=12060.On Error
  2877. :i1 id=ix129.On Error
  2878. :i2 refid=ix9.On Error
  2879. :i2 refid=ix76.On Error
  2880. :sl compact.
  2881. :hp2.On Error Statement:ehp2.
  2882. :li.
  2883. :li.
  2884. :hp2.Syntax:ehp2.:lm margin=14.:hp2.ON [Local] Error:ehp2.:hp1. :ehp1.{:hp2.GoTo:ehp2.:hp1. label :ehp1.[ :hp2.Resume Next :ehp2.]:hp2. GoTo 0:ehp2.}:lm margin=1.
  2885. :li.
  2886. :li.
  2887. :hp2.Comments:ehp2.:lm margin=14.The :hp2.On Error:ehp2. statement enables an error-handling routine, 
  2888. specifying the location of that routine within procedure&per.  :hp2.On Error:ehp2. can also be 
  2889. used to disable an error-handling routine&per.  Unless an :hp2.On Error:ehp2. statement is 
  2890. used, any run-time error will be fatal, i&per.e&per., SBL will terminate the execution 
  2891. of the program&per.:lm margin=1.
  2892. :li.
  2893. :lm margin=14.An :hp2.On Error:ehp2. statement is composed of the following parts&colon.:lm margin=1.
  2894. :li.
  2895. :lm margin=14.:hp7.Part:ehp7.:lm margin=31.:hp7.Definition:lm margin=14.:ehp7.:lm margin=1.
  2896. :li.
  2897. :lm margin=14.:hp2.Local:ehp2.:lm margin=31.Keyword allowed in error-handling routines at the 
  2898. procedure level&per.  Used to ensure compatibility with other variants of BASIC&per.:lm margin=1.
  2899. :li.
  2900. :lm margin=14.:hp2.GoTo:ehp2. :hp1.label:ehp1.:lm margin=31.Enables the error-handling routine that starts at :hp1.
  2901. label:ehp1.&per.  If the designated :hp1.label:ehp1. is not in the same procedure as the :hp2.On Error:ehp2. 
  2902. statement, BASIC will generate an error message&per.:lm margin=1.
  2903. :li.
  2904. :lm margin=14.:hp2.Resume Next:ehp2.:lm margin=31.This establishes that when a run-time error 
  2905. occurs, control is passed to the statement which immediately follows the 
  2906. statement in which the error occurred&per.  At this point, the :hp2.Err:ehp2. function can be 
  2907. used to retrieve the error-code of the run-time error&per.:lm margin=1.
  2908. :li.
  2909. :lm margin=14.:hp2.GoTo 0:ehp2.:lm margin=31.Disables any error handler that has been enabled&per.:lm margin=1.
  2910. :li.
  2911. :lm margin=14.When it is referenced by an :hp2.On Error GoTo:ehp2. :hp1.label:ehp1. statement, an 
  2912. error-handler is enabled&per.   Once this enabling occurs, a run-time error will 
  2913. result in program control switching to the error-handling routine and 
  2914. "activating" the error handler&per.  The error handler remains active from the time 
  2915. the run-time error has been trapped until a :hp2.Resume:ehp2. statement is executed in the 
  2916. error handler&per.:lm margin=1.
  2917. :li.
  2918. :lm margin=14.If another error occurs while the error handler is active, SBL 
  2919. will search for an error handler in the procedure which called the current 
  2920. procedure ( if this fails, SBL will look for a handler belonging to the 
  2921. caller's caller, &per.&per.&per.)&per.  If a handler is found, the current procedure will 
  2922. terminate, and the error handler in the calling procedure will be activated&per.:lm margin=1.
  2923. :li.
  2924. :lm margin=14.It is an error (No Resume) to execute an :hp2.End:ehp2. :hp2.Sub:ehp2. or :hp2.End Function:ehp2. 
  2925. statement while an error handler is active&per.  The :hp2.Exit Sub:ehp2. or :hp2.Exit Function:ehp2. 
  2926. statement can be uset to end the error condition and exit the current procedure&per.:lm margin=1.
  2927. :li.
  2928. :esl.
  2929. :h2 x=right y=bottom width=50% height=100% res=12070.Open
  2930. :i1 id=ix130.Open
  2931. :i2 refid=ix9.Open
  2932. :i2 refid=ix29.Open
  2933. :sl compact.
  2934. :hp2.Open Statement:ehp2.
  2935. :li.
  2936. :li.
  2937. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Open:ehp2.:hp1. filename$:ehp1.:hp2. For :ehp2.:hp1.mode:ehp1.:hp2. As [:ehp2.:hp1.#:ehp1.:hp2.] :ehp2.:hp1.filenumber%:ehp1.:lm margin=1.
  2938. :li.
  2939. :li.
  2940. :hp2.Comment:ehp2.:hp2.s:ehp2.:lm margin=14.The :hp2.Open:ehp2. statement enables I/O to a file or a device&per.  A file must 
  2941. be opened before any input/output operation can be performed on it&per.  :lm margin=1.
  2942. :li.
  2943. :lm margin=14.The argument :hp1.filename$:ehp1. is a string expression specifying the file 
  2944. to open&per.  :hp1.Mode:ehp1. is a keyword that specifies one of the following&colon. :hp2.Input:ehp2. 
  2945. (sequential input mode), :hp2.Output:ehp2. (sequential output mode), or :hp2.Append:ehp2. (sequential 
  2946. output mode)&per.:lm margin=1.
  2947. :li.
  2948. :lm margin=14.:hp1.Filenumber%:ehp1. is an integer expression with a value between 1 and 
  2949. 255&per.  The :link reftype=hd res=10750.:hp7.FreeFile:ehp7.:elink. function can be used to return the next available filenumber&per.:lm margin=1.
  2950. :li.
  2951. :esl.
  2952. :h2 x=right y=bottom width=50% height=100% res=12073.Option Base
  2953. :i1 id=ix131.Option Base
  2954. :i2 refid=ix9.Option Base
  2955. :i2 refid=ix66.Option Base
  2956. :i2 refid=ix63.Option Base
  2957. :i2 refid=ix65.Option Base
  2958. :sl compact.
  2959. :hp2.Option Base Statement:ehp2.
  2960. :li.
  2961. :li.
  2962. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Option Base:ehp2.:hp1. lowerBound%:ehp1.:lm margin=1.
  2963. :li.
  2964. :li.
  2965. :hp2.Comments:ehp2.:lm margin=14.The :hp2.Option Base:ehp2. statement specifies the default lower bound to be 
  2966. used for array subscripts&per.  The :hp1.lowerBound:ehp1. must be either 0 or 1&per.  If no :hp2.Option 
  2967. Base:ehp2. statement is specified, the default lower bound for array subscripts will 
  2968. be 0&per.  :lm margin=1.
  2969. :li.
  2970. :lm margin=14.The :hp2.Option Base:ehp2. statement is not allowed inside a procedure, and 
  2971. must precede any use of arrays in the module&per.  Only one :hp2.Option Base:ehp2. statement 
  2972. is allowed per module&per.:lm margin=1.
  2973. :li.
  2974. :esl.
  2975. :h2 x=right y=bottom width=50% height=100% res=12075.OptionButton
  2976. :i1 id=ix132.Option
  2977. :i1 id=ix133.OptionGroup
  2978. :i2 refid=ix133.OptionButton
  2979. :i2 refid=ix9.OptionButton
  2980. :i2 refid=ix14.OptionButton
  2981. :i2 refid=ix17.OptionButton
  2982. :sl compact.
  2983. :hp2.OptionButton Statement:ehp2.
  2984. :li.
  2985. :li.
  2986. :hp2.Syntax:ehp2.:lm margin=14.:hp2.OptionButton :ehp2.:hp1.x, y,:ehp1. :hp1.dx, dy, text$:ehp1.:lm margin=1.
  2987. :li.
  2988. :li.
  2989. :hp2.Comments:ehp2.:lm margin=14.The :hp2.OptionButton:ehp2. statements  --there must be at least two -- are 
  2990. used to define the position and text associated with an option button&per.  They 
  2991. are used in conjunction with the :link reftype=hd res=12076.:hp7.OptionGroup:ehp7.:elink. statement&per.:lm margin=1.
  2992. :li.
  2993. :lm margin=14.The :hp2.OptionButton:ehp2. statement  can only be used between a :link reftype=hd res=10115.:hp7.Begin Dialog:ehp7.:elink.
  2994.  and an :hp2.End Dialog:ehp2. statement&per.:lm margin=1.
  2995. :li.
  2996. :lm margin=14.The :hp1.x:ehp1. and :hp1.y:ehp1. arguments set the position of the button relative to 
  2997. the upper left corner of the dialog box&per.  :hp1.Dx:ehp1. and :hp1.dy :ehp1.set the width and height of 
  2998. the button&per.  A:hp1. dy:ehp1. value of 12 typically accommodates text in the system font&per. :lm margin=1.
  2999. :li.
  3000. :lm margin=14.The:hp1. text$:ehp1. field contains the caption that appears to the right of 
  3001. the option button icon&per.  If the width of this string is greater than :hp1.dx:ehp1., 
  3002. trailing characters will be truncated&per.   If you wish to include underlined 
  3003. characters so that the option selection can be made from the keyboard, the 
  3004. character must be preceded with an ampersand (&.)&per.:lm margin=1.
  3005. :li.
  3006. :esl.
  3007. :h2 x=right y=bottom width=50% height=100% res=12076.OptionGroup
  3008. :i2 refid=ix133.OptionGroup
  3009. :i2 refid=ix9.OptionGroup
  3010. :i2 refid=ix14.OptionGroup
  3011. :i2 refid=ix17.OptionGroup
  3012. :sl compact.
  3013. :hp2.OptionGroup Statement:ehp2.
  3014. :li.
  3015. :li.
  3016. :hp2.Syntax:ehp2.:lm margin=14.:hp2.OptionGroup :ehp2.:hp1.&per.field:ehp1.:lm margin=1.
  3017. :li.
  3018. :li.
  3019. :hp2.Comments:ehp2.:lm margin=14.The :hp2.OptionGro:ehp2.:hp2.up:ehp2. statement is used in conjunction with :link reftype=hd res=12075.:hp7.OptionButton:ehp7.:elink. 
  3020. statements to set up a series of related options&per.  The :hp2.OptionGroup:ehp2. Statement 
  3021. begins definition of the option buttons and establishes the dialog-record field 
  3022. that will contain the current option selection&per.  :hp1.&per.Field:ehp1. will contain a value 0 
  3023. when the choice associated with the first :link reftype=hd res=12075.:hp7.OptionButton:ehp7.:elink. statement is selected, a 
  3024. value of 1 when the choice associated with the second :link reftype=hd res=12075.:hp7.OptionButton:ehp7.:elink. statement is 
  3025. chosen, etc&per. :lm margin=1.
  3026. :li.
  3027. :lm margin=14.The :hp2.OptionG:ehp2.:hp2.roup:ehp2. statement  can only be used between a :link reftype=hd res=10115.:hp7.Begin Dialog:ehp7.:elink. 
  3028. and an :hp2.End Dialog:ehp2. statement&per.:lm margin=1.
  3029. :li.
  3030. :esl.
  3031. :h2 x=right y=bottom width=50% height=100% res=12080.Print
  3032. :i1 id=ix134.Print
  3033. :i2 refid=ix9.Print
  3034. :i2 refid=ix29.Print
  3035. :i1 id=ix135.Output
  3036. :i2 refid=ix135.Print
  3037. :sl compact.
  3038. :hp2.Print Statement:ehp2.
  3039. :li.
  3040. :li.
  3041. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Print:ehp2. [ :hp1.# filenumber%, :ehp1.] :hp1.expressionlist:ehp1. [ { ; | , } ] :lm margin=1.
  3042. :li.
  3043. :li.
  3044. :hp2.Comments:ehp2.:lm margin=14.The :hp2.Print:ehp2. statement outputs data to the specified:hp1. filenumber%:ehp1.&per.  If 
  3045. the :hp1.expressionlist:ehp1. is omitted, a blank line is written to the file&per.:lm margin=1.
  3046. :li.
  3047. :lm margin=14.:hp1.Filenumber%:ehp1. is optional&per.  If this argument is omitted, the :hp2.Print:ehp2. 
  3048. statement outputs data to the screen&per.:lm margin=1.
  3049. :li.
  3050. :lm margin=14.:hp1.Filenumber%:ehp1. is an integer expression identifying the print 
  3051. destination&per.  :lm margin=1.
  3052. :li.
  3053. :lm margin=14.:hp1.Ex:ehp1.:hp1.pressionlist:ehp1. is the values that are printed&per.  The argument can 
  3054. contain numeric or string expressions&per.  Expressions are separated by either a 
  3055. semi-colon (";") or a comma (",") &per.  A semi-colon indicates that the next value 
  3056. should appear immediately after the preceding one without intervening white 
  3057. space&per.  A comma indicates that the next value should be positioned at the next 
  3058. print zone&per.  Print zones begin every 14 spaces&per.:lm margin=1.
  3059. :li.
  3060. :lm margin=14.The optional [{;|,}] argument at the end of the :hp2.Print:ehp2. statement 
  3061. determines where output for the next :hp2.Print:ehp2. statement to the same output file 
  3062. should begin&per.  A semi-colon will place output immediately after the output from 
  3063. this :hp2.Print:ehp2. statement on the current line; a comma will start output at the next 
  3064. print zone on the current line&per.  If neither separator is specified, a CR-LF 
  3065. pair will be generated and the next :hp2.Print:ehp2. statement will print to the next line&per.:lm margin=1.
  3066. :li.
  3067. :lm margin=14.The :hp2.Print:ehp2. statement supports only elementary BASIC data types&per.  
  3068. See :link reftype=hd res=11270.:hp7.Input:ehp7.:elink. for more information on parsing this statement&per.:lm margin=1.
  3069. :li.
  3070. :esl.
  3071. :h2 x=right y=bottom width=50% height=100% res=12085.Randomize
  3072. :i1 id=ix136.Randomize
  3073. :i2 refid=ix9.Randomize
  3074. :i2 refid=ix4.Randomize
  3075. :sl compact.
  3076. :hp2.Randomize Statement:ehp2.
  3077. :li.
  3078. :li.
  3079. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Randomize  :ehp2.[:hp1.numeric-expression% :ehp1.]:lm margin=1.
  3080. :li.
  3081. :li.
  3082. :hp2.Comments:ehp2.:lm margin=14.The :hp2.Randomize:ehp2. function seeds the random number generator&per.  The 
  3083. (optional) argument :hp1.numeric-expression% :ehp1.is an integer value between -32768 and 
  3084. 32767&per.  If no :hp1.numeric-expression%:ehp1. argument is given, BASIC uses the :link reftype=hd res=12520.:hp5.Timer:ehp5.:elink. 
  3085. function to initialize the random number generator&per.:lm margin=1.
  3086. :li.
  3087. :esl.
  3088. :h2 x=right y=bottom width=50% height=100% res=12087.ReDim
  3089. :i2 refid=ix65.ReDim
  3090. :i2 refid=ix9.ReDim
  3091. :i2 refid=ix66.ReDim
  3092. :i2 refid=ix63.ReDim
  3093. :i2 refid=ix45.ReDim
  3094. :sl compact.
  3095. :li.
  3096. :hp2.ReDim Statement:ehp2.
  3097. :li.
  3098. :li.
  3099. :hp2.Syntax:ehp2.:lm margin=14.:hp2.ReDim:ehp2. :hp1.variableName:ehp1. ( :hp1.subscriptRange, &per.&per.&per.:ehp1. ):hp2. :ehp2.[:hp2.As :ehp2.:hp1.type:ehp1.] , &per.&per.&per.:lm margin=1.
  3100. :li.
  3101. :li.
  3102. :hp2.Comments:ehp2.:lm margin=14.You use the :hp2.ReDim:ehp2. statement to change the upper and lower bounds 
  3103. of a dynamic array's dimensions&per.  Memory for the dynamic array will be 
  3104. reallocated to support the specified dimensions, and the array elements will be 
  3105. reinitialized&per.  :hp2.ReDim:ehp2. can not be used at the module level - it must be used 
  3106. inside of a procedure&per.:lm margin=1.
  3107. :li.
  3108. :lm margin=14.A dynamic array is normally created by using :link reftype=hd res=10600.:hp7.Dim:ehp7.:elink. to declare an 
  3109. array without a specified :hp1.subscriptRange:ehp1.&per.  The maximum number of dimensions for 
  3110. a dynamic array created in this fashion is 8&per.  If you need more than 8 
  3111. dimensions, you may use the :hp2.ReDim:ehp2. statement inside of a procedure to declare an 
  3112. array which has not previously been declared using :link reftype=hd res=10600.:hp7.Dim:ehp7.:elink. or :link reftype=hd res=11050.:hp7.Global:ehp7.:elink.&per.  In this 
  3113. case, the maximum number of dimensions allowed is 60&per.:lm margin=1.
  3114. :li.
  3115. :lm margin=14.The available :link reftype=hd res=20100.:hp5.data types:ehp5.:elink. for arrays are&colon.  numbers, strings, and 
  3116. records&per.  Arrays of arrays, :link reftype=hd res=20300.:hp5.dialog box records:ehp5.:elink., and :link reftype=hd res=20200.:hp5.ADTs:ehp5.:elink. are not supported&per.:lm margin=1.
  3117. :li.
  3118. :lm margin=14.If the :hp2.As:ehp2. clause is not used, the type of the variable may be 
  3119. specified by using a :link reftype=fn refid=typeCharacter.:hp5.type character:ehp5.:elink. as a suffix to the name&per.  The two different 
  3120. type-specification methods can be intermixed in a single :hp2.ReDim:ehp2. statement 
  3121. (although not on the same variable)&per.:lm margin=1.
  3122. :li.
  3123. :lm margin=14.The :hp2.ReDim:ehp2. statement cannot be used to change the number of 
  3124. dimensions of a dynamic array once the array has been given dimensions&per.  It can 
  3125. only to change the upper and lower bounds of the dimensions of the array&per.  The :link reftype=hd res=11360.:hp7.
  3126. LBound:ehp7.:elink. and :link reftype=hd res=12580.:hp7.UBound:ehp7.:elink. functions can be used to query the current bounds of an array 
  3127. variable's dimensions&per.:lm margin=1.
  3128. :li.
  3129. :lm margin=14.Care should be taken to avoid :hp2.ReDim:ehp2.'ing an array in a procedure 
  3130. that has received a reference to an element in the array in an argument; the 
  3131. result is unpredictable&per.:lm margin=1.
  3132. :li.
  3133. :lm margin=14.The :hp1.subscriptRange :ehp1.is of the format&colon.
  3134. :li.
  3135. :li.
  3136. :lm margin=14.[ :hp1.startSubscript:ehp1. :hp2.To:ehp2. ] :hp1.endSubscript:ehp1.:lm margin=1.
  3137. :li.
  3138. :lm margin=14.If :hp1.startSubscript:ehp1. is not specified, 0 is used as the default&per.  The :link reftype=hd res=12073.:hp7.
  3139. Option Base:ehp7.:elink. statement can be used to change the default&per.:lm margin=1.
  3140. :li.
  3141. :esl.
  3142. :h2 x=right y=bottom width=50% height=100% res=12089.Rem
  3143. :i1 id=ix137.Rem
  3144. :i2 refid=ix51.Rem
  3145. :i2 refid=ix9.Rem
  3146. :sl compact.
  3147. :hp2.Rem Statement:ehp2.
  3148. :li.
  3149. :li.
  3150. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Rem :ehp2.:hp1.arbitrary text:ehp1.:lm margin=1.
  3151. :li.
  3152. :li.
  3153. :hp2.Comment:ehp2.:lm margin=14.:hp2.Rem:ehp2. is used by the BASIC programmer to insert a comment in a BASIC 
  3154. program&per.  Everything from :hp2.Rem :ehp2.to the end of the line is ignored&per.:lm margin=1.
  3155. :li.
  3156. :lm margin=14.The single quote (') can also be used to initiate a comment&per.  
  3157. Metacommands (e&per.g&per., :hp2.CSTRINGS:ehp2.) must be preceded by the single quote comment form&per.:lm margin=1.
  3158. :li.
  3159. :esl.
  3160. :h2 x=right y=bottom width=50% height=100% res=12090.Reset
  3161. :i1 id=ix138.Reset
  3162. :i2 refid=ix9.Reset
  3163. :i2 refid=ix29.Reset
  3164. :i2 refid=ix35.Reset
  3165. :sl compact.
  3166. :hp2.Reset Statement:ehp2.
  3167. :li.
  3168. :li.
  3169. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Reset :ehp2.:lm margin=1.
  3170. :li.
  3171. :li.
  3172. :hp2.Comments:ehp2.:lm margin=14.The :hp2.Reset:ehp2. statement closes all disk files that are open, and 
  3173. writes any data still remaining in the operating system buffers to disk&per. :lm margin=1.
  3174. :li.
  3175. :esl.
  3176. :h2 x=right y=bottom width=50% height=100% res=12095.Resume
  3177. :i1 id=ix139.Resume
  3178. :i2 refid=ix9.Resume
  3179. :i2 refid=ix76.Resume
  3180. :sl compact.
  3181. :hp2.Resume Statement:ehp2.
  3182. :li.
  3183. :li.
  3184. :hp2.Syntax A:ehp2.:lm margin=14.:hp2.Resume Next:ehp2.:lm margin=1.
  3185. :li.
  3186. :li.
  3187. :hp2.Syntax B:ehp2.:lm margin=14.:hp2.Resume :ehp2.:hp1.label:ehp1.:lm margin=1.
  3188. :li.
  3189. :li.
  3190. :hp2.Syntax C:ehp2.:lm margin=14.:hp2.Resume [ 0 ]:ehp2.:lm margin=1.
  3191. :li.
  3192. :li.
  3193. :hp2.Comments:ehp2.:lm margin=14.The :hp2.Resume :ehp2.statement halts an error-handling routine:lm margin=1.
  3194. :li.
  3195. :lm margin=14.When the :hp2.Resume Next:ehp2. statement is used, control is passed to the 
  3196. statement which immediately follows the statement in which the error occurred&per.  :lm margin=1.
  3197. :li.
  3198. :lm margin=14.When the :hp2.Resume :ehp2.:hp1.label :ehp1.statement is used, control is passed to the 
  3199. statement which immediately follows the specified label&per.:lm margin=1.
  3200. :li.
  3201. :lm margin=14.When the :hp2.Resume [ 0 ] :ehp2.statement is used, control is passed to the 
  3202. statement in which the error occurred&per.:lm margin=1.
  3203. :li.
  3204. :lm margin=14.The location of the error handler which has caught the error 
  3205. determines where execution will resume&per.  If an error is trapped in the same 
  3206. procedure as the error handler, program execution will resume with the 
  3207. statement that caused the error&per.  If an error is located in a different 
  3208. procedure from the error handler, program control reverts to the statement that 
  3209. last called out the procedure containing the error handler&per.:lm margin=1.
  3210. :li.
  3211. :esl.
  3212. :h2 x=right y=bottom width=50% height=100% res=12100.Right$
  3213. :i1 id=ix140.Right$
  3214. :i2 refid=ix6.Right$
  3215. :i2 refid=ix3.Right$
  3216. :sl compact.
  3217. :hp2.Right$ Function:ehp2.
  3218. :li.
  3219. :li.
  3220. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Right$ ( :ehp2.:hp1.string$:ehp1.:hp2., :ehp2.:hp1.length% :ehp1.:hp2.):ehp2.:lm margin=1.
  3221. :li.
  3222. :li.
  3223. :hp2.Returns:ehp2.:lm margin=14.The :hp2.Right$:ehp2. function returns a string of a specified :hp1.length :ehp1.copied 
  3224. from the rightmost length characters from the string :hp1.string$:ehp1.&per.:lm margin=1.
  3225. :li.
  3226. :li.
  3227. :hp2.Comments:ehp2.:lm margin=14.If the length of :hp1.string$:ehp1. is less than :hp1.length%:ehp1., Right$ returns the 
  3228. whole string&per.:lm margin=1.
  3229. :li.
  3230. :esl.
  3231. :h2 x=right y=bottom width=50% height=100% res=12110.RmDir
  3232. :i1 id=ix141.RmDir
  3233. :i2 refid=ix3.RmDir
  3234. :i2 refid=ix28.RmDir
  3235. :sl compact.
  3236. :hp2.RmDir Statement:ehp2.
  3237. :li.
  3238. :li.
  3239. :hp2.Syntax:ehp2.:lm margin=14.:hp2.RmDir :ehp2.:hp1.pathname$:ehp1.:hp2. :ehp2.:lm margin=1.
  3240. :li.
  3241. :li.
  3242. :hp2.Comments:ehp2.:lm margin=14.The :hp2.RmDir:ehp2. function removes a directory&per.:lm margin=1.
  3243. :li.
  3244. :lm margin=14.:hp1.Pathname$ :ehp1.is a string expression identifying the directory to 
  3245. remove&per.  The syntax for :hp1.pathname$:ehp1. is&colon.:lm margin=1.
  3246. :li.
  3247. :lm margin=14.:lm margin=14.[:hp1.drive:ehp1.&colon.] [\] :hp1.directory:ehp1. [\:hp1.directory:ehp1.]:lm margin=1.
  3248. :li.
  3249. :lm margin=14.The:hp1. drive:ehp1. argument is optional&per. The:hp1. directory:ehp1. argument is a 
  3250. directory name&per.:lm margin=1.
  3251. :li.
  3252. :lm margin=14.The directory to be removed must be empty, except for the working 
  3253. ( &per. ) and parent ( &per.&per. ) directories&per.:lm margin=1.
  3254. :li.
  3255. :esl.
  3256. :h2 x=right y=bottom width=50% height=100% res=12120.Rnd
  3257. :i1 id=ix142.Rnd
  3258. :i2 refid=ix3.Rnd
  3259. :i2 refid=ix4.Rnd
  3260. :sl compact.
  3261. :hp2.Rnd Function:ehp2.
  3262. :li.
  3263. :li.
  3264. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Rnd :ehp2.[ :hp2.(:ehp2.:hp1.number!:ehp1.:hp2.) :ehp2.]:lm margin=1.
  3265. :li.
  3266. :li.
  3267. :hp2.Returns:ehp2.:lm margin=14.The :hp2.Rnd:ehp2. function returns a single precision random number between 
  3268. 0 and 1&per.:lm margin=1.
  3269. :li.
  3270. :li.
  3271. :hp2.Comment:ehp2.:lm margin=14.The same sequence of random numbers is generated whenever the 
  3272. program is run, unless the random number generated is re-initialized by the :link reftype=hd res=12085.:hp7.
  3273. Randomize:ehp7.:elink. statement&per.:lm margin=1.
  3274. :li.
  3275. :esl.
  3276. :h2 x=right y=bottom width=50% height=100% res=12130.RTrim$
  3277. :i1 id=ix143.RTrim$
  3278. :i2 refid=ix6.RTrim$
  3279. :i2 refid=ix3.RTrim$
  3280. :sl compact.
  3281. :hp2.RTrim$ Function:ehp2.
  3282. :li.
  3283. :li.
  3284. :hp2.Syntax:ehp2.:lm margin=14.:hp2.RTrim$ ( :ehp2.:hp1.string$:ehp1.:hp2. ):ehp2.:lm margin=1.
  3285. :li.
  3286. :li.
  3287. :hp2.Returns:ehp2.:lm margin=14.The :hp2.RTrim$:ehp2. function returns a copy of the source :hp1.string:ehp1., with all 
  3288. trailing space characters removed&per.:lm margin=1.
  3289. :li.
  3290. :esl.
  3291. :h2 x=right y=bottom width=50% height=100% res=12140.Seek Function
  3292. :i1 id=ix144.Seek
  3293. :i2 refid=ix144.Seek Function
  3294. :i2 refid=ix3.Seek Function
  3295. :i2 refid=ix29.Seek Function
  3296. :sl compact.
  3297. :hp2.Seek Function:ehp2.
  3298. :li.
  3299. :li.
  3300. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Seek :ehp2.:hp1.(filenumber%):ehp1.:lm margin=1.
  3301. :li.
  3302. :li.
  3303. :hp2.Returns:ehp2.:lm margin=14.The :hp2.Seek:ehp2. function returns the current file position for the file 
  3304. specified:hp1.  :ehp1.by :hp1.filenumber%:ehp1.&per.:lm margin=1.
  3305. :li.
  3306. :li.
  3307. :hp2.Comments:ehp2.:lm margin=14.:hp1.Filenumber%:ehp1. is an integer expression identifying the open file to 
  3308. read the file position of&per.:lm margin=1.
  3309. :li.
  3310. :esl.
  3311. :h2 x=right y=bottom width=50% height=100% res=12150.Seek
  3312. :i2 refid=ix144.Seek
  3313. :i2 refid=ix9.Seek
  3314. :i2 refid=ix29.Seek
  3315. :sl compact.
  3316. :hp2.Seek Statement:ehp2.
  3317. :li.
  3318. :li.
  3319. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Seek :ehp2.[#] :hp1.filenumber%, position&.:ehp1.:lm margin=1.
  3320. :li.
  3321. :li.
  3322. :hp2.Comments:ehp2.:lm margin=14.The :hp2.Seek:ehp2. statement sets the position within a file for the next 
  3323. read or write&per.  If you write to a file after seeking beyond the end of the 
  3324. file, the file's length is extended&per.  BASIC will return an error message if a :hp2.
  3325. Seek:ehp2. operation is attempted which specifies a negative or zero position&per.:lm margin=1.
  3326. :li.
  3327. :lm margin=14.:hp1.Filenumber:ehp1.:hp1.%:ehp1. is an integer expression identifying the open file to :hp2.
  3328. Seek:ehp2. in&per.  :hp1.Position&. :ehp1.is a numeric expression that indicates where the next write 
  3329. or read will occur&per.  This argument's value must be between 1 and 2,146,483,647&per.:lm margin=1.
  3330. :li.
  3331. :esl.
  3332. :h2 x=right y=bottom width=50% height=100% res=12200.Select
  3333. :i1 id=ix145.Select
  3334. :i2 refid=ix9.Select
  3335. :i1 id=ix146.Case
  3336. :i2 refid=ix100.Select
  3337. :i2 refid=ix87.Select
  3338. :i1 id=ix147.Is
  3339. :sl compact.
  3340. :hp2.Select Case Statement:ehp2.
  3341. :li.
  3342. :li.
  3343. :hp2.Syntax:ehp2.  :lm margin=14.:hp2.Select:ehp2. :hp2.Case:ehp2.:hp1. testexpression:ehp1.:lm margin=1.
  3344. :li.
  3345. :lm margin=14.[:hp2.Case:ehp2. :hp1.expressionlist:ehp1.:lm margin=1.
  3346. :li.
  3347. :lm margin=14.:lm margin=14.[:hp1.statement_block:ehp1.] ]:lm margin=1.
  3348. :li.
  3349. :lm margin=14.[:hp2.Case:ehp2. :hp1.expressionlist:ehp1.:lm margin=1.
  3350. :li.
  3351. :lm margin=14.:lm margin=14.[:hp1.statement_block:ehp1.] ]:lm margin=1.
  3352. :li.
  3353. :lm margin=14.&per.
  3354. :li.
  3355. &per.:lm margin=1.
  3356. :li.
  3357. :lm margin=14.[:hp2.Case Else:ehp2.:lm margin=1.
  3358. :li.
  3359. :lm margin=14.:lm margin=14.[:hp1.statement_block:ehp1.] ]:lm margin=1.
  3360. :li.
  3361. :lm margin=14.:hp2.End Select:ehp2.:lm margin=1.
  3362. :li.
  3363. :li.
  3364. :hp2.Comments:ehp2.:lm margin=14.The :hp2.Select Case:ehp2. Statement is used to execute one of a series of 
  3365. statement blocks, depending on the value of an expression&per. :lm margin=1.
  3366. :li.
  3367. :lm margin=14.The :hp1.testexpression:ehp1. can be any numeric or string expression that 
  3368. you wish to test for&per.  Each :hp1.statement_block:ehp1. can contain any number of statement 
  3369. on any number of lines&per.:lm margin=1.
  3370. :li.
  3371. :lm margin=14.The :hp1.expressionlist(s):ehp1. may be a comma-separated list of expressions 
  3372. of the following forms&colon.:lm margin=1.
  3373. :li.
  3374. :lm margin=14.:lm margin=14.:hp1.expression:ehp1.:lm margin=1.
  3375. :li.
  3376. :lm margin=14.:lm margin=14.:hp1.expression :ehp1.:hp2.To:ehp2.:hp1. expression:ehp1.:lm margin=1.
  3377. :li.
  3378. :lm margin=14.:lm margin=14.:hp2.Is:ehp2. :hp1.comparison_operator expression :ehp1. :lm margin=1.
  3379. :li.
  3380. :lm margin=14.The type of each :hp1.expression:ehp1. must be compatible with the type of :hp1.
  3381. testexpression:ehp1.&per.  :lm margin=1.
  3382. :li.
  3383. :lm margin=14.When there is a match between:hp1. testexpressio:ehp1.:hp1.n:ehp1. and one of the :hp2.Case:ehp2. :hp1.
  3384. expressions:ehp1., the statement block following the :hp2.Case:ehp2. clause is executed&per.  When 
  3385. the next :hp2.Case:ehp2. clause is reached, execution control passes to the statement 
  3386. which follows the :hp2.End Select:ehp2. statement&per.:lm margin=1.
  3387. :li.
  3388. :lm margin=14.Note that when the :hp2.To:ehp2. keyword is used to specify a range of 
  3389. values, the smaller value must appear first&per.  The :hp1.comparison_operator:ehp1. used with 
  3390. the :hp2.Is:ehp2. keyword is one of&colon. <, >, =, <=, >=, <>&per.  :lm margin=1.
  3391. :li.
  3392. :esl.
  3393. :h2 x=right y=bottom width=50% height=100% res=12300.SetField$
  3394. :i1 id=ix148.SetField$
  3395. :i2 refid=ix6.SetField$
  3396. :i2 refid=ix93.SetField$
  3397. :i2 refid=ix3.SetField$
  3398. :sl compact.
  3399. :hp2.SetField$ Function:ehp2.
  3400. :li.
  3401. :li.
  3402. :hp2.Syntax:ehp2.:lm margin=14.:hp2.SetField$( :ehp2.:hp1.string$:ehp1.:hp2.,:ehp2.:hp1. field_number%:ehp1.:hp2.,:ehp2.:hp1. field$:ehp1.:hp2.,:ehp2.:hp1. separator_chars$ :ehp1.:hp2.):ehp2.:lm margin=1.
  3403. :li.
  3404. :li.
  3405. :hp2.Returns:ehp2.:lm margin=14.The :hp2.SetField$:ehp2. function returns a string created from a copy of the 
  3406. source :hp1.string:ehp1. with a substring replaced&per.  :lm margin=1.
  3407. :li.
  3408. :li.
  3409. :hp2.Comments:ehp2.:lm margin=14.The source :hp1.string :ehp1.is considered to be divided into fields by 
  3410. separator characters&per.  Multiple separator characters may be specified&per.  The 
  3411. fields are numbered starting with one&per.:lm margin=1.
  3412. :li.
  3413. :lm margin=14.If :hp1.field_number:ehp1. is greater than the number of fields in the 
  3414. string, the returned string will be extended with separator characters to 
  3415. produce a string with the proper number of fields&per.  If more than one separator 
  3416. character was specified, the first one will be used as the separator character&per.:lm margin=1.
  3417. :li.
  3418. :lm margin=14.It is legal for the new field value to be a different size than 
  3419. the old field value&per.:lm margin=1.
  3420. :li.
  3421. :esl.
  3422. :h2 x=right y=bottom width=50% height=100% res=12310.Sgn
  3423. :i1 id=ix149.Sgn
  3424. :i2 refid=ix3.Sgn
  3425. :i2 refid=ix4.Sgn
  3426. :sl compact.
  3427. :hp2.Sgn Function:ehp2.
  3428. :li.
  3429. :li.
  3430. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Sgn (:ehp2.:hp1.numeric-expression:ehp1.:hp2.):ehp2.:lm margin=1.
  3431. :li.
  3432. :li.
  3433. :hp2.Returns:ehp2.:lm margin=14.:hp2.Sgn:ehp2. returns a value indicating the sign of the :hp1.numeric-expression:ehp1.&per.:lm margin=1.
  3434. :li.
  3435. :li.
  3436. :hp2.Comments:ehp2.:lm margin=14.The value that the :hp2.Sgn:ehp2. function returns depends on the sign of the 
  3437. numeric-expression&colon.:lm margin=1.
  3438. :li.
  3439. :lm margin=14.For :hp1.numeric-expressions:ehp1. >  0, :hp2.Sgn:ehp2. (:hp1.numeric-expression:ehp1.) returns 1&per.:lm margin=1.
  3440. :li.
  3441. :lm margin=14.For :hp1.numeric-expressions:ehp1. = 0, :hp2.Sgn:ehp2. (:hp1.numeric-expressi:ehp1.:hp1.on:ehp1.) returns 0&per.:lm margin=1.
  3442. :li.
  3443. :lm margin=14.For :hp1.numeric-expressions:ehp1. <  0, :hp2.Sgn:ehp2. (:hp1.numeric-expression:ehp1.) returns -1&per.:lm margin=1.
  3444. :li.
  3445. :esl.
  3446. :h2 x=right y=bottom width=50% height=100% res=12320.Shell
  3447. :i1 id=ix150.Shell
  3448. :i2 refid=ix3.Shell
  3449. :sl compact.
  3450. :hp2.Shell Function:ehp2.
  3451. :li.
  3452. :li.
  3453. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Shell :ehp2.(:hp1.commandstring$, :ehp1.[:hp1.windowstyle%:ehp1.]):lm margin=1.
  3454. :li.
  3455. :li.
  3456. :hp2.Returns:ehp2.:lm margin=14.The :hp2.Shell:ehp2. function returns a Task ID, a unique number that 
  3457. identifies the running program&per.:lm margin=1.
  3458. :li.
  3459. :li.
  3460. :hp2.Comments:ehp2.:lm margin=14.The :hp2.Shell:ehp2. function runs an executable program&per. :hp1. Commandstring$:ehp1. is 
  3461. the name of the program to execute&per.  It may be the name of any valid &per.COM, 
  3462. &per.EXE&per., &per.BAT, or &per.PIF file&per.  Arguments or command line switches can also be 
  3463. included&per.  If :hp1.commandstring$:ehp1. is not a valid executable file name, or if :hp2.Shell:ehp2. 
  3464. cannot start the program, an error message will be generated&per.:lm margin=1.
  3465. :li.
  3466. :lm margin=14.:hp1.Windowstyle%:ehp1. is the style of the window in which the program is to 
  3467. be executed&per.  It may be one of the following&colon.:lm margin=1.
  3468. :li.
  3469. :lm margin=28.:rm margin=21.:hp7.Value:ehp7.:lm margin=43.:hp7.Window :lm margin=28.Style:ehp7.:lm margin=1.:rm margin=1.
  3470. :li.
  3471. :lm margin=28.  1:lm margin=43.Normal :lm margin=28.window with focus:lm margin=1.
  3472. :li.
  3473. :lm margin=28.  2:lm margin=43.Minimized :lm margin=28.with focus:lm margin=1.
  3474. :li.
  3475. :lm margin=28.  3:lm margin=43.Maximized :lm margin=28.with focus:lm margin=1.
  3476. :li.
  3477. :lm margin=28.  4:lm margin=43.Normal :lm margin=28.window without focus:lm margin=1.
  3478. :li.
  3479. :lm margin=28.  7:lm margin=43.Minimized :lm margin=28.without focus:lm margin=1.
  3480. :li.
  3481. :lm margin=14.If :hp1.windowstyle% :ehp1.is not specified, the default of:hp1. windowstyle%:ehp1. = 1 
  3482. is assumed (normal window with focus)&per.:lm margin=1.
  3483. :li.
  3484. :esl.
  3485. :h2 x=right y=bottom width=50% height=100% res=12322.Sin
  3486. :i1 id=ix151.Sin
  3487. :i2 refid=ix3.Sin
  3488. :i2 refid=ix11.Sin
  3489. :sl compact.
  3490. :hp2.Sin Function:ehp2.
  3491. :li.
  3492. :li.
  3493. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Sin:ehp2.( :hp1.angle :ehp1.):lm margin=1.
  3494. :li.
  3495. :li.
  3496. :hp2.Returns:ehp2.:lm margin=14.The :hp2.Sin:ehp2. function returns the sine of an angle&per.  The return value 
  3497. will be between -1 and 1&per.  The return value is single-precision if the angle is 
  3498. an integer or single-precision value, double precision for a long or 
  3499. double-precision value&per.:lm margin=1.
  3500. :li.
  3501. :li.
  3502. :hp2.Comments:ehp2.:lm margin=14.The :hp1.angle:ehp1. is specified in radians, and can be either positive or 
  3503. negative&per.:lm margin=1.
  3504. :li.
  3505. :esl.
  3506. :h2 x=right y=bottom width=50% height=100% res=12325.Space$
  3507. :i1 id=ix152.Space$
  3508. :i2 refid=ix6.Space$
  3509. :i2 refid=ix3.Space$
  3510. :sl compact.
  3511. :hp2.Space$ Function:ehp2.
  3512. :li.
  3513. :li.
  3514. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Space$( :ehp2.:hp1.numeric-expression:ehp1.:hp2. ):ehp2.:lm margin=1.
  3515. :li.
  3516. :li.
  3517. :hp2.Returns:ehp2.:lm margin=14.The :hp2.Space$:ehp2. function returns a string of spaces&per.:lm margin=1.
  3518. :li.
  3519. :li.
  3520. :hp2.Comments:ehp2.:lm margin=14.The argument numeric-expression indicates the number of spaces 
  3521. which the returned string will contain&per.  Any numeric data type can be used, but 
  3522. the number will be rounded to an integer&per.  The numeric-expression must be 
  3523. between 0 and 32,767&per.:lm margin=1.
  3524. :li.
  3525. :esl.
  3526. :h2 x=right y=bottom width=50% height=100% res=12327.Sqr
  3527. :i1 id=ix153.Sqr
  3528. :i2 refid=ix3.Sqr
  3529. :i2 refid=ix83.Sqr
  3530. :sl compact.
  3531. :hp2.Sqr Function:ehp2.
  3532. :li.
  3533. :li.
  3534. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Sqr( :ehp2.:hp1.numeric-expression:ehp1.:hp2. ):ehp2.:lm margin=1.
  3535. :li.
  3536. :li.
  3537. :hp2.Returns:ehp2.:lm margin=14.The :hp2.Sqr:ehp2. function returns the square root of :hp1.numeric-expression:ehp1.&per.:lm margin=1.
  3538. :li.
  3539. :li.
  3540. :hp2.Comment:ehp2.:lm margin=14.The return value is single-precision for an integer or 
  3541. single-precision numeric expression, double precision for a long or 
  3542. double-precision numeric expression&per.:lm margin=1.
  3543. :li.
  3544. :esl.
  3545. :h2 x=right y=bottom width=50% height=100% res=12330.Stop
  3546. :i1 id=ix154.Stop
  3547. :i2 refid=ix9.Stop
  3548. :sl compact.
  3549. :hp2.Stop Statement:ehp2.
  3550. :li.
  3551. :li.
  3552. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Stop:ehp2.:lm margin=1.
  3553. :li.
  3554. :li.
  3555. :hp2.Comments:ehp2.:lm margin=14.The :hp2.Stop:ehp2. statement halts program execution&per.:lm margin=1.
  3556. :li.
  3557. :lm margin=14.:hp2.Stop:ehp2. statements can be placed anywhere in a program to suspend its 
  3558. execution&per.  While the :hp2.Stop:ehp2. statement halts program execution, it does not close 
  3559. files or clear variables&per.  :lm margin=1.
  3560. :li.
  3561. :esl.
  3562. :h2 x=right y=bottom width=50% height=100% res=12400.Str$
  3563. :i1 id=ix155.Str$
  3564. :i2 refid=ix6.Str$
  3565. :i2 refid=ix3.Str$
  3566. :i2 refid=ix7.Str$
  3567. :sl compact.
  3568. :hp2.Str$ Function:ehp2.
  3569. :li.
  3570. :li.
  3571. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Str$( :ehp2.:hp1.numeric-expression:ehp1.:hp2. ):ehp2.:lm margin=1.
  3572. :li.
  3573. :li.
  3574. :hp2.Returns:ehp2.:lm margin=14.The :hp2.Str$:ehp2. function returns a string representation of a :hp1.
  3575. numeric-expression:ehp1.&per.:lm margin=1.
  3576. :li.
  3577. :li.
  3578. :hp2.Comment:ehp2.:lm margin=14.The precision in the returned string is single-precision for an 
  3579. integer or single-precision numeric expression, double precision for a long or 
  3580. double-precision numeric expression&per.:lm margin=1.
  3581. :li.
  3582. :esl.
  3583. :h2 x=right y=bottom width=50% height=100% res=12410.String$
  3584. :i1 id=ix156.String$
  3585. :i2 refid=ix6.String$
  3586. :i2 refid=ix3.String$
  3587. :sl compact.
  3588. :hp2.String$ Function:ehp2.
  3589. :li.
  3590. :li.
  3591. :hp2.Syntax A:ehp2.:lm margin=14.:hp2.String$( :ehp2.:hp1.numeric-expression, charcode%:ehp1.:hp2. ):ehp2.:lm margin=1.
  3592. :li.
  3593. :li.
  3594. :hp2.Syntax B:ehp2.:lm margin=14.:hp2.String$ (:ehp2.:hp1.numeric-expression, string-expression$:ehp1.:hp3. :ehp3.:hp2.):ehp2.:lm margin=1.
  3595. :li.
  3596. :li.
  3597. :hp2.Returns:ehp2.:lm margin=14.The :hp2.String$:ehp2. function returns a string consisting of a repeated 
  3598. character&per.:lm margin=1.
  3599. :li.
  3600. :li.
  3601. :hp2.Comments:ehp2.:lm margin=14.:hp1.Numeric-expression:ehp1. specifies the length of the string to be 
  3602. returned&per.  This number must be between 0 and 32,767&per.:lm margin=1.
  3603. :li.
  3604. :lm margin=14.:hp1.Charcode%:ehp1. is a decimal ANSI code of the character that will be 
  3605. used to create the string&per.  It is a numeric expression that BASIC will evaluate 
  3606. as an integer between 0 and 255&per.:lm margin=1.
  3607. :li.
  3608. :lm margin=14.:hp1.String-expression$:ehp1. is a string argument, the first character of 
  3609. which becomes the repeated character&per.:lm margin=1.
  3610. :li.
  3611. :esl.
  3612. :h2 x=right y=bottom width=50% height=100% res=12500.Sub
  3613. :i2 refid=ix20.Sub
  3614. :i1 id=ix157.Subprogram
  3615. :i2 refid=ix9.Sub
  3616. :i2 refid=ix90.Sub
  3617. :sl compact.
  3618. :hp2.Sub &per.&per.&per. End Sub Statement:ehp2.
  3619. :li.
  3620. :li.
  3621. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Sub :ehp2.:hp1.name:ehp1.:hp2. [ ( :ehp2.:hp1.parameter:ehp1. :hp2.[ :ehp2. :hp2.As :ehp2.:hp1.type:ehp1.:hp2.] , &per.&per.&per.) ]:ehp2.
  3622. :li.
  3623. :li.
  3624. :hp2.End Sub:ehp2.:lm margin=1.
  3625. :li.
  3626. :li.
  3627. :hp2.Comments:ehp2.:lm margin=14.The :hp2.Sub&per.&per.EndSub:ehp2. structure defines a subprogram procedure&per.  A call 
  3628. to a subprogram stands alone as a separate statement&per.  (See the :link reftype=hd res=10200.:hp7.Call:ehp7.:elink. 
  3629. statement)&per.  Recursion is supported&per. :lm margin=1.
  3630. :li.
  3631. :lm margin=14.The parameters are specified as a comma-separated list of 
  3632. parameter names&per.  The data type of a parameter may be specified by using a :link reftype=hd res=4.:hp5.type 
  3633. character:ehp5.:elink. or by using the :hp2.As:ehp2. clause&per.  Record parameters are declared by using 
  3634. an :hp2.As:ehp2. clause and a :hp1.type:ehp1. which has previously been defined using the :link reftype=hd res=12560.:hp7.Type:ehp7.:elink. 
  3635. statement&per.  Array parameters are indicated by using empty parentheses after the :hp1.
  3636. parameter:ehp1.&per.  The array dimensions are not be specified in the :hp2.Sub:ehp2. statement&per.  
  3637. All references to an array parameter within the body of the subprogram must 
  3638. have a consistent number of dimensions&per.:lm margin=1.
  3639. :li.
  3640. :lm margin=14.The function returns to the caller when the :hp2.End Sub:ehp2. statement is 
  3641. reached or when an :link reftype=hd res=10700.:hp7.Exit Sub:ehp7.:elink. statement is executed&per.:lm margin=1.
  3642. :li.
  3643. :lm margin=14.BASIC procedures use the :link reftype=fn refid=callByReference.:hp5.call by reference:ehp5.:elink. convention&per.  This means 
  3644. that if a procedure assigns a value to a parameter, it will modify the variable 
  3645. passed by the caller&per.  This feature should be used with great care&per.:lm margin=1.
  3646. :li.
  3647. :lm margin=14.The MAIN subprogram has a special meaning&per.  In many 
  3648. implementations of BASIC, MAIN will be called when the module is "run"&per.  The 
  3649. MAIN subprogram is not allowed to take arguments&per.:lm margin=1.
  3650. :li.
  3651. :lm margin=14.Use :link reftype=hd res=10900.:hp7.Function:ehp7.:elink. to define a procedure which has a return value&per.:lm margin=1.
  3652. :li.
  3653. :esl.
  3654. :h2 x=right y=bottom width=50% height=100% res=12502.Tan
  3655. :i1 id=ix158.Tan
  3656. :i2 refid=ix3.Tan
  3657. :i2 refid=ix11.Tan
  3658. :sl compact.
  3659. :hp2.Tan Function:ehp2.
  3660. :li.
  3661. :li.
  3662. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Tan:ehp2.( :hp1.angle :ehp1.):lm margin=1.
  3663. :li.
  3664. :li.
  3665. :hp2.Returns:ehp2.:lm margin=14.The :hp2.Tan:ehp2. function returns the tangent of an angle&per.  The return 
  3666. value is single-precision if the angle is an integer or single-precision value, 
  3667. double precision for a long or double-precision value&per.:lm margin=1.
  3668. :li.
  3669. :li.
  3670. :hp2.Comments:ehp2.:lm margin=14.The :hp1.angle:ehp1. is specified in radians, and can be either positive or 
  3671. negative&per.:lm margin=1.
  3672. :li.
  3673. :esl.
  3674. :h2 x=right y=bottom width=50% height=100% res=12505.Text
  3675. :i1 id=ix159.Text
  3676. :i2 refid=ix9.Text
  3677. :i2 refid=ix14.Text
  3678. :sl compact.
  3679. :hp2.Text Statement:ehp2.
  3680. :li.
  3681. :li.
  3682. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Text :ehp2.:hp1.x, y,:ehp1. :hp1.d:ehp1.:hp1.x, dy, text$:ehp1.:lm margin=1.
  3683. :li.
  3684. :li.
  3685. :hp2.Comments:ehp2.:lm margin=14.The :hp2.Text:ehp2. statement is used set up line(s) of text in a dialog box&per.:lm margin=1.
  3686. :li.
  3687. :lm margin=14.The :hp2.Text:ehp2. statement  can only be used between a :link reftype=hd res=10115.:hp7.Begin Dialog:ehp7.:elink. and an :hp2.
  3688. End Dialog:ehp2. statement&per.:lm margin=1.
  3689. :li.
  3690. :lm margin=14.The :hp1.x:ehp1. and :hp1.y:ehp1. arguments set the position of the upper left hand 
  3691. corner of the text area relative to the upper left corner of the dialog box&per.  :hp1.Dx:ehp1.
  3692.  and :hp1.dy :ehp1.set the width and height of the text area&per.  :lm margin=1.
  3693. :li.
  3694. :lm margin=14.The:hp1. text$:ehp1. field contains the text  that will appear to the right 
  3695. of the position designated by the :hp1.x/y:ehp1. coordinates&per.&per.  If the width of this 
  3696. string is greater than :hp1.dx:ehp1., the spillover characters wrap to the next line&per.  
  3697. This will continue as long as the height of the text area established by :hp1.dy:ehp1. is 
  3698. not exceeded&per.  Excess characters will be truncated&per.:lm margin=1.
  3699. :li.
  3700. :lm margin=14.By preceding an underlined character in:hp1. text$:ehp1. with an ampersand 
  3701. (&.), you enable a user to press the underlined character on the keyboard and 
  3702. position the cursor in the combo or text box defined in the statement 
  3703. immediately following the :hp2.Text:ehp2. statement&per.:lm margin=1.
  3704. :li.
  3705. :esl.
  3706. :h2 x=right y=bottom width=50% height=100% res=12506.TextBox
  3707. :i1 id=ix160.TextBox
  3708. :i2 refid=ix9.TextBox
  3709. :i2 refid=ix14.TextBox
  3710. :sl compact.
  3711. :hp2.TextBox Statement:ehp2.
  3712. :li.
  3713. :li.
  3714. :hp2.Syntax:ehp2.:lm margin=14.:hp2.TextBox :ehp2.:hp1.x, y,:ehp1. :hp1.dx, dy, &per.field:ehp1.:lm margin=1.
  3715. :li.
  3716. :li.
  3717. :hp2.Comments:ehp2.:lm margin=14.The :hp2.TextBox:ehp2. Statement is used to create a box, used within a 
  3718. dialog box, in which the user can enter and edit text &per.:lm margin=1.
  3719. :li.
  3720. :lm margin=14.The :hp2.TextBox:ehp2. statement  can only be used between a :link reftype=hd res=10115.:hp7.Begin Dialog:ehp7.:elink. and 
  3721. an :hp2.End Dialog:ehp2. statement&per.:lm margin=1.
  3722. :li.
  3723. :lm margin=14.The :hp1.x:ehp1. and :hp1.y:ehp1. arguments set  the position of the upper left hand 
  3724. corner of the text box relative to the upper left corner of the dialog box&per.  :hp1.Dx:ehp1. 
  3725. and :hp1.dy :ehp1.set the width and height of the text area&per.  A:hp1. dy :ehp1.value of 12 will 
  3726. usually accommodate text in the system font&per.:lm margin=1.
  3727. :li.
  3728. :lm margin=14.The :hp1.&per.field :ehp1.argument is the name of the dialog-record field that 
  3729. will hold the any text entered in the text box&per.  When the user selects the OK 
  3730. button, or any pushbutton other than cancel, the text string entered in the 
  3731. text box will be recorded in the :hp1.&per.field:ehp1. field&per.:lm margin=1.
  3732. :li.
  3733. :esl.
  3734. :h2 x=right y=bottom width=50% height=100% res=12510.Time$
  3735. :i1 id=ix161.Time$
  3736. :i2 refid=ix6.Time$
  3737. :i2 refid=ix3.Time$
  3738. :sl compact.
  3739. :hp2.Time$ Function:ehp2.
  3740. :li.
  3741. :li.
  3742. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Time$:ehp2.:lm margin=1.
  3743. :li.
  3744. :li.
  3745. :hp2.Returns:ehp2.:lm margin=14.The :hp2.Time$:ehp2. function returns a string representing the current time&per.:lm margin=1.
  3746. :li.
  3747. :li.
  3748. :hp2.Comments:ehp2.:lm margin=14.The :hp2.Time$:ehp2. function returns an eight character string&per.  The format 
  3749. of the string is ":hp1.hh&colon.mm&colon.ss:ehp1." where :hp1.hh:ehp1. is the hour, :hp1.mm:ehp1. is the minutes and :hp1.ss:ehp1. is 
  3750. the seconds&per.  The hour is specified in military style, and ranges from 0 to 23&per.:lm margin=1.
  3751. :li.
  3752. :esl.
  3753. :h2 x=right y=bottom width=50% height=100% res=12520.Timer
  3754. :i1 id=ix162.Timer
  3755. :i2 refid=ix3.Timer
  3756. :i2 refid=ix4.Timer
  3757. :sl compact.
  3758. :hp2.Timer Function:ehp2.
  3759. :li.
  3760. :li.
  3761. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Timer:ehp2.:lm margin=1.
  3762. :li.
  3763. :li.
  3764. :hp2.Returns:ehp2.:lm margin=14.The :hp2.Timer:ehp2. function returns the number of seconds that have elapsed 
  3765. since midnight&per.:lm margin=1.
  3766. :li.
  3767. :li.
  3768. :hp2.Comments:ehp2.:lm margin=14.The Timer function can be used in conjunction with the :link reftype=hd res=12085.:hp7.Randomize:ehp7.:elink. 
  3769. statement to seed the random number generator&per.:lm margin=1.
  3770. :li.
  3771. :esl.
  3772. :h2 x=right y=bottom width=50% height=100% res=12560.Type
  3773. :i2 refid=ix61.Type
  3774. :i2 refid=ix9.Type
  3775. :i2 refid=ix67.Type
  3776. :sl compact.
  3777. :hp2.Type Statement:ehp2.
  3778. :li.
  3779. :li.
  3780. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Type :ehp2.:hp1.userType:ehp1.
  3781. :li.
  3782. :lm margin=14.:hp1.field1:ehp1. :hp2.As:ehp2. :hp1.type1:ehp1.
  3783. :li.
  3784. :lm margin=14.:hp1.field2:ehp1. :hp2.As:ehp2. :hp1.type2:ehp1.
  3785. :li.
  3786. :lm margin=14.:hp1.' &per.&per.&per.:ehp1.
  3787. :li.
  3788. :hp2.End Type:ehp2.:lm margin=1.
  3789. :li.
  3790. :li.
  3791. :hp2.Comments:ehp2.:lm margin=14.The :hp2.Type:ehp2. statement declares a user-defined type which can then be 
  3792. used in the :link reftype=hd res=10600.:hp5.DIM:ehp5.:elink. statement to declare a record variable&per.  Such a user-defined 
  3793. type is also sometimes referred to as a :hp1.record type:ehp1. or a :hp1.structure type:ehp1.&per.:lm margin=1.
  3794. :li.
  3795. :lm margin=14.Between the :hp2.Type:ehp2. and:hp2. Type End:ehp2. you may define a number of elements 
  3796. known as :hp1.fields:ehp1.&per.  Each field may be of the following type&colon.  string (either 
  3797. dynamic  or fixed),  number (integer, long, single or double), or a 
  3798. previously-defined record type&per.  A field may not be an array&per.  However, arrays 
  3799. of records are allowed&per.:lm margin=1.
  3800. :li.
  3801. :lm margin=14.The :hp2.Type:ehp2. statement is not valid inside of a procedure definition&per.:lm margin=1.
  3802. :li.
  3803. :lm margin=14.To access the fields of a record, use notation of the form&colon.
  3804. :li.
  3805. :li.
  3806. :lm margin=14.recordName&per.fieldName&per.
  3807. :li.
  3808. :li.
  3809. To access the fields of an array of records, use notation of the form&colon.
  3810. :li.
  3811. :li.
  3812. :lm margin=14.arrayName( index )&per.fieldName:lm margin=1.
  3813. :li.
  3814. :lm margin=1.:li.
  3815. :esl.
  3816. :h2 x=right y=bottom width=50% height=100% res=12580.UBound
  3817. :i1 id=ix163.UBound
  3818. :i2 refid=ix3.UBound
  3819. :i2 refid=ix66.UBound
  3820. :sl compact.
  3821. :hp2.UBound Function:ehp2.
  3822. :li.
  3823. :li.
  3824. :hp2.Syntax:ehp2.:lm margin=14.:hp2.UBound ( :ehp2.:hp1.arrayVariable:ehp1. [, :hp1.dimension:ehp1. ]:hp2. ):ehp2.:lm margin=1.
  3825. :li.
  3826. :li.
  3827. :hp2.Returns:ehp2.:lm margin=14.The :hp2.UBound:ehp2. function returns the upper bound of the subscript range 
  3828. for the specified :hp1.dimension:ehp1. of the :hp1.arrayVariable:ehp1.&per.  :lm margin=1.
  3829. :li.
  3830. :li.
  3831. :hp2.Comments:ehp2.:lm margin=14.The dimensions of an array are numbered starting with 1&per.  If the :hp1.
  3832. dimension:ehp1. is not specified, 1 is used as a default&per.  :lm margin=1.
  3833. :li.
  3834. :link reftype=hd res=11360.:lm margin=14.:hp7.LBound:ehp7.:elink. can be used with :hp2.UBound:ehp2. to determine the length of an array&per.:lm margin=1.
  3835. :li.
  3836. :esl.
  3837. :h2 x=right y=bottom width=50% height=100% res=12600.UCase$
  3838. :i1 id=ix164.UCase
  3839. :i2 refid=ix3.UCase$
  3840. :i2 refid=ix6.UCase$
  3841. :sl compact.
  3842. :hp2.UCase$ Function:ehp2.
  3843. :li.
  3844. :li.
  3845. :hp2.Syntax:ehp2.:lm margin=14.:hp2.UCase$ ( :ehp2.:hp1.string$:ehp1.:hp2. ):ehp2.:lm margin=1.
  3846. :li.
  3847. :li.
  3848. :hp2.Returns:ehp2.:lm margin=14.The :hp2.UCase$:ehp2. function returns a copy of the source :hp1.string:ehp1., with all 
  3849. lower case letters converted to upper case&per.  :lm margin=1.
  3850. :li.
  3851. :li.
  3852. :hp2.Comments:ehp2.:lm margin=14.The translation is based on the country specified in the Windows 
  3853. Control Panel&per.:lm margin=1.
  3854. :li.
  3855. :esl.
  3856. :h2 x=right y=bottom width=50% height=100% res=12700.Val
  3857. :i1 id=ix165.Val
  3858. :i2 refid=ix6.Val
  3859. :i2 refid=ix3.Val
  3860. :i2 refid=ix7.Val
  3861. :sl compact.
  3862. :hp2.Val Function:ehp2.
  3863. :li.
  3864. :li.
  3865. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Val( :ehp2.:hp1.string$:ehp1.:hp2. ):ehp2.:lm margin=1.
  3866. :li.
  3867. :li.
  3868. :hp2.Returns:ehp2.:lm margin=14.The :hp2.Val:ehp2. function returns a numeric value corresponding to the 
  3869. first number found in the specified :hp1.string:ehp1.&per.  :lm margin=1.
  3870. :li.
  3871. :li.
  3872. :hp2.Comments:ehp2.:lm margin=14.Spaces in the source string are ignored&per.  If no number is found, 0 
  3873. is returned&per.:lm margin=1.
  3874. :li.
  3875. :esl.
  3876. :h2 x=right y=bottom width=50% height=100% res=12800.While
  3877. :i1 id=ix166.While
  3878. :i2 refid=ix72.While
  3879. :i2 refid=ix9.While
  3880. :i1 id=ix167.Wend
  3881. :sl compact.
  3882. :hp2.While &per.&per.&per. Wend:ehp2.
  3883. :li.
  3884. :li.
  3885. :hp2.Syntax:ehp2.:lm margin=14.:hp2.While :ehp2.:hp1.condition:ehp1.:lm margin=1.
  3886. :li.
  3887. :lm margin=14.:hp1.statementblock:ehp1.:lm margin=1.
  3888. :li.
  3889. :lm margin=14.:hp2.Wend:ehp2.:lm margin=1.
  3890. :li.
  3891. :li.
  3892. :hp2.Comments:ehp2.:lm margin=14.The :hp2.While&per.&per.&per.Wend:ehp2. structure controls a repetitive action&per.  The :hp1.
  3893. condition:ehp1. is tested, and if :hp2.TRUE:ehp2., the :hp1.statementblock:ehp1. is executed   This process 
  3894. is repeated until :hp1.condition:ehp1. becomes :hp2.FALSE:ehp2.&per.:lm margin=1.
  3895. :li.
  3896. :lm margin=14.The :hp2.While:ehp2. statement is included in SBL for compatibility with 
  3897. older versions of Basic&per.  The :link reftype=hd res=10612.:hp7.Do:ehp7.:elink. statement is a more general and powerful flow 
  3898. control statement&per.:lm margin=1.
  3899. :li.
  3900. :esl.
  3901. :h2 x=right y=bottom width=50% height=100% res=12810.Write
  3902. :i1 id=ix168.Write
  3903. :i2 refid=ix9.Write
  3904. :i2 refid=ix135.Write
  3905. :i2 refid=ix29.Write
  3906. :sl compact.
  3907. :hp2.Write  Statement:ehp2.
  3908. :li.
  3909. :li.
  3910. :hp2.Syntax:ehp2.:lm margin=14.:hp2.Write :ehp2.[:hp2.#:ehp2.] :hp1.filenumber% :ehp1. [,:hp1.expressionlist:ehp1.] :lm margin=1.
  3911. :li.
  3912. :li.
  3913. :hp2.Comments:ehp2.:lm margin=14.The :hp2.Write :ehp2.statement writes data to a sequential file&per.  The file 
  3914. must be opened in output or append mode&per.:lm margin=1.
  3915. :li.
  3916. :lm margin=14.The :hp1.filenumber%:ehp1. is an integer expression identifying the open file 
  3917. to write to&per.  :hp1.Expressionlist :ehp1.specifies one or more values to be written to the 
  3918. file&per.   An expression must be string and/or numeric expressions, separated by 
  3919. commas&per.  If the expressionlist argument is omitted, the :hp2.Write :ehp2.statement writes 
  3920. a blank line to the file&per.  (See :link reftype=hd res=11270.:hp7.Input:ehp7.:elink. for more information&per.):lm margin=1.
  3921. :li.
  3922. :lm margin=1.:li.
  3923. :esl.
  3924. :h1 x=right y=bottom width=50% height=100% res=20000.Expressions
  3925. :i1 id=ix169.Expressions
  3926. :i1 id=ix170.Operators
  3927. :i1 id=ix171.IMP
  3928. :i1 id=ix172.XOR
  3929. :i1 id=ix173.EQV
  3930. :i1 id=ix174.AND
  3931. :i1 id=ix175.NOT
  3932. :i1 id=ix176.OR
  3933. :i1 id=ix177.MOD
  3934. :sl compact.
  3935. :hp2.Expressions:ehp2.
  3936. :li.
  3937. Precedence order of operators from low to high&per.  Parentheses can be used to 
  3938. override the default precedence&per.
  3939. :li.
  3940. :li.
  3941. :lm margin=4.( ):lm margin=28.Array element :lm margin=1.
  3942. :li.
  3943. :lm margin=4.&per.:lm margin=28.Record member - the left operand must be a record 
  3944. variable, and the right operand must be the name of a field&per.:lm margin=1.
  3945. :li.
  3946. :lm margin=4.:hp2.Imp:ehp2.:lm margin=28.Implication - operands can be :hp2.Integer:ehp2. or :hp2.Long:ehp2.&per.  The 
  3947. operation is performed bitwise&per.  (A :hp2.Imp:ehp2. B) is the same as ((:hp2.Not:ehp2. A) OR B )&per.:lm margin=1.
  3948. :li.
  3949. :lm margin=4.:hp2.Eqv:ehp2.:lm margin=28.Equivalence - operands can be :hp2.Integer:ehp2. or :hp2.Long:ehp2.&per.  The 
  3950. operation is performed bitwise&per. (A :hp2.Eqv:ehp2. B) is the same as (:hp2.Not:ehp2. (A :hp2.Xor:ehp2. B))&per.:lm margin=1.
  3951. :li.
  3952. :lm margin=4.:hp2.Xor:ehp2.:lm margin=28.Exclusive Or - operands can be :hp2.Integer:ehp2. or :hp2.Long:ehp2.&per.  The 
  3953. operation is performed bitwise&per.:lm margin=1.
  3954. :li.
  3955. :lm margin=4.:hp2.Or:ehp2.:lm margin=28.Inclusive Or - operands can be :hp2.Integer:ehp2. or :hp2.Long:ehp2.&per.  The 
  3956. operation is performed bitwise&per.:lm margin=1.
  3957. :li.
  3958. :lm margin=4.:hp2.And:ehp2.:lm margin=28.And - operands can be :hp2.Integer:ehp2. or :hp2.Long:ehp2.&per.  The 
  3959. operation is performed bitwise&per.:lm margin=1.
  3960. :li.
  3961. :lm margin=4.:hp2.Not:ehp2.:lm margin=28.Unary Not - operand can be :hp2.Integer:ehp2. or :hp2.Long:ehp2.&per.  The 
  3962. operation is performed bitwise (one's complement)&per.:lm margin=1.
  3963. :li.
  3964. :lm margin=4.>, <, =, <=, >=, <>:lm margin=28.Numeric or String comparison&per.  For numbers, the 
  3965. operands will be widened to the least common type (:hp2.Integer:ehp2. is preferred over :hp2.
  3966. Long:ehp2., which is preferred over :hp2.Single:ehp2., which is preferred over :hp2.Double:ehp2.)&per.  For :hp2.
  3967. Strings:ehp2., the comparison is case-sensitive, and based on the collating sequence 
  3968. used by the language specified by the user using the Windows Control Panel&per.  
  3969. The result is 0 for FALSE and -1 for TRUE&per.:lm margin=1.
  3970. :li.
  3971. :lm margin=4.-, +:lm margin=28.Numeric addition and subtraction&per.  The + operator is 
  3972. also used for string concatenation&per.:lm margin=1.
  3973. :li.
  3974. :lm margin=4.:hp2.Mod:ehp2.:lm margin=28.Modulus or Remainder&per. The operands can be :hp2.Integer:ehp2. or :hp2.
  3975. Long:ehp2.&per.:lm margin=1.
  3976. :li.
  3977. :lm margin=4.\:lm margin=28.Integer division&per.  The operands can be :hp2.Integer:ehp2. or :hp2.
  3978. Long:ehp2.&per.:lm margin=1.
  3979. :li.
  3980. :lm margin=4.*, /:lm margin=28.Numeric multiplication or division&per.  For division, 
  3981. the result is a :hp2.Double:ehp2.&per.:lm margin=1.
  3982. :li.
  3983. :lm margin=4.-,+:lm margin=28.Unary minus and plus&per. :lm margin=1.
  3984. :li.
  3985. :lm margin=4.^:lm margin=28.Exponentiation:lm margin=1.
  3986. :li.
  3987. :esl.
  3988. :h1 x=right y=bottom width=50% height=100% res=20100.Type Conversion
  3989. :i2 refid=ix7.Type Conversion
  3990. :i2 refid=ix39.Type Conversion
  3991. :i2 refid=ix40.Type Conversion
  3992. :i2 refid=ix41.Type Conversion
  3993. :i2 refid=ix42.Type Conversion
  3994. :i2 refid=ix43.Type Conversion
  3995. :i2 refid=ix44.Type Conversion
  3996. :i1 id=ix178.ADT
  3997. :i2 refid=ix178.Type Conversion
  3998. :i2 refid=ix67.Type Conversion
  3999. :i2 refid=ix66.Type Conversion
  4000. :sl compact.
  4001. :hp2.Data Types and Type Conversion:ehp2.
  4002. :li.
  4003. BASIC is a strongly-typed language&per.  Variables can be declared implicitly on 
  4004. first reference by using a type character; if no type character is present, the 
  4005. default type of :hp2.Double:ehp2. is assumed&per.  Alternatively, the type of a variable can 
  4006. be declared explicitly with the:hp2. :ehp2.:link reftype=hd res=10600.:hp7.Dim:ehp7.:elink. statement&per.  In either case, the variable 
  4007. can only contain data of the declared type&per.  Variables of user-defined type 
  4008. must be explicitly declared&per.  SBL supports standard Basic numeric, string, 
  4009. record and array data&per.  SBL also supports Dialog Box Records and Application 
  4010. Data Types (which are defined by the application)&per.
  4011. :li.
  4012. :li.
  4013. :li.
  4014. :hp2.Numbers:ehp2.
  4015. :li.
  4016. :li.
  4017. The four numeric types are&colon.
  4018. :li.
  4019. :li.
  4020. :lm margin=7.:hp2.Integer:ehp2.:lm margin=21.from -32,768 to 32,767:lm margin=1.
  4021. :li.
  4022. :li.
  4023. :lm margin=7.:hp2.Long:ehp2.:lm margin=21.from -2,147,483,648 to 2,147,483,647:lm margin=1.
  4024. :li.
  4025. :li.
  4026. :lm margin=7.:hp2.Single:ehp2.:lm margin=21.from -3&per.402823e+38 to -1&per.401298e-45, 0&per.0, 1&per.401298e-45 to 
  4027. 3&per.402823466e+38:lm margin=1.
  4028. :li.
  4029. :li.
  4030. :lm margin=7.:rm margin=-2.:hp2.Double:ehp2.:lm margin=21.from -1&per.797693134862315d+308 to -4&per.94065645841247d-308, 
  4031. 0&per.0, 2&per.2250738585072014d-308 to 1&per.797693134862315d+308:lm margin=1.:rm margin=1.
  4032. :li.
  4033. :li.
  4034. Numeric values are always signed&per.
  4035. :li.
  4036. :li.
  4037. Basic has no true boolean variables&per.  BASIC considers 0 to be FALSE and any 
  4038. other numeric value to be TRUE&per.  Only numeric values can be used as booleans&per.  
  4039. Comparison operator expressions always return 0 for FALSE and -1 for TRUE&per.
  4040. :li.
  4041. :li.
  4042. Integer constants can be expressed in decimal, octal, or hexadecimal notation&per.  
  4043. Decimal constants are expressed by simply using the decimal representation&per.  To 
  4044. represent an octal value, precede the constant with "&.O" or "&.o" (e&per.g&per., &.o177)&per. 
  4045.  To represent a hexadecimal value, precede the constant with "&.H" or "&.h" 
  4046. (e&per.g&per., &.H8001)&per.
  4047. :li.
  4048. :li.
  4049. :li.
  4050. :hp2.Strings:ehp2.
  4051. :li.
  4052. :li.
  4053. BASIC strings can be either fixed or dynamic&per.  Fixed strings have a length 
  4054. specified when they are defined, and the length cannot be changed&per.  Fixed 
  4055. strings cannot be of 0 length&per.  Dynamic strings have no specified length&per. Any 
  4056. string can vary in length from 0 to 32,767 characters&per.  There are no 
  4057. restrictions on the characters which can be included in a string&per.  For example, 
  4058. the character whose ANSI value is 0 can be embedded in strings&per.
  4059. :li.
  4060. :li.
  4061. :li.
  4062. :hp2.Records:ehp2.
  4063. :li.
  4064. :li.
  4065. A record, or record variable, is a data structure containing one or more 
  4066. elements, each of which has a value&per.  Before declaring a record variable, a :link reftype=hd res=12560.:hp7.Type:ehp7.:elink.
  4067.  must be defined&per.  Once the :hp2.Type :ehp2.is defined, the variable can be declared to be 
  4068. of that type&per.  The variable name should not have a type character suffix&per.  
  4069. :li.
  4070. :li.
  4071. Record elements are referenced using dot notation, e&per.g&per., :hp1.varname&per.elementname:ehp1.&per.  
  4072. Records can contain elements which are themselves records&per.
  4073. :li.
  4074. :li.
  4075. :li.
  4076. :hp2.Arrays:ehp2.
  4077. :li.
  4078. :li.
  4079. Arrays are created by specifying one or more subscripts at declaration or :link reftype=hd res=12087.:hp7.Redim:ehp7.:elink. 
  4080. time&per.  Subscripts specifies the beginning and ending index for each dimension&per.  
  4081. If only an ending index is specified, the beginning index depends on the :link reftype=hd res=12073.:hp7.Option 
  4082. Base:ehp7.:elink. setting&per.  Array elements are referenced by enclosing the proper number of 
  4083. index values in parentheses after the array name, e&per.g&per. :hp1.arrayname(i,j,k):ehp1.&per.
  4084. :li.
  4085. :li.
  4086. See the :link reftype=hd res=10600.:hp7.Dim:ehp7.:elink. statement for more information&per.
  4087. :li.
  4088. :li.
  4089. :li.
  4090. :hp2.Conversions:ehp2.
  4091. :li.
  4092. :li.
  4093. BASIC will automatically convert data between any two numeric types&per.  When 
  4094. converting from a larger type to a smaller type (for example :hp2.Long:ehp2. to :hp2.Integer:ehp2.), 
  4095. a runtime numeric overflow may occur&per.  This indicates that the number of the 
  4096. larger type is too large for the target data type&per.  Loss of precision is not a 
  4097. runtime error (e&per.g&per., when converting from :hp2.Double:ehp2. to :hp2.Single:ehp2., or from either 
  4098. float type to either integer type)&per.
  4099. :li.
  4100. :li.
  4101. BASIC will also automatically convert between fixed strings and dynamic 
  4102. strings&per.  When converting a fixed string to dynamic, a dynamic string which has 
  4103. the same length and contents as the fixed string will be created&per.  When 
  4104. converting from a dynamic string to a fixed string, some adjustment may be 
  4105. required&per.  If the dynamic string is shorter than the fixed string, the 
  4106. resulting fixed string will be extended with spaces&per.  If the dynamic string is 
  4107. longer than the fixed string, the resulting fixed string will be a truncated 
  4108. version of the dynamic string&per.  No runtime errors are caused by string 
  4109. conversions&per.
  4110. :li.
  4111. :li.
  4112. No other implicit conversions are supported&per.  In particular, BASIC will not 
  4113. automatically convert between numeric and string data&per.  Use the functions :link reftype=hd res=12700.:hp7.Val:ehp7.:elink. 
  4114. and :link reftype=hd res=12400.:hp7.Str$:ehp7.:elink. for such conversions&per.
  4115. :li.
  4116. :li.
  4117. :esl.
  4118. :fn id=typeConversion.
  4119. :sl compact.
  4120. :hp2.Data Types and Type Conversion:ehp2.
  4121. :li.
  4122. BASIC is a strongly-typed language&per.  Variables can be declared implicitly on 
  4123. first reference by using a type character; if no type character is present, the 
  4124. default type of :hp2.Double:ehp2. is assumed&per.  Alternatively, the type of a variable can 
  4125. be declared explicitly with the:hp2. :ehp2.:link reftype=hd res=10600.:hp7.Dim:ehp7.:elink. statement&per.  In either case, the variable 
  4126. can only contain data of the declared type&per.  Variables of user-defined type 
  4127. must be explicitly declared&per.  SBL supports standard Basic numeric, string, 
  4128. record and array data&per.  SBL also supports Dialog Box Records and Application 
  4129. Data Types (which are defined by the application)&per.
  4130. :li.
  4131. :li.
  4132. :li.
  4133. :hp2.Numbers:ehp2.
  4134. :li.
  4135. :li.
  4136. The four numeric types are&colon.
  4137. :li.
  4138. :li.
  4139. :lm margin=7.:hp2.Integer:ehp2.:lm margin=21.from -32,768 to 32,767:lm margin=1.
  4140. :li.
  4141. :li.
  4142. :lm margin=7.:hp2.Long:ehp2.:lm margin=21.from -2,147,483,648 to 2,147,483,647:lm margin=1.
  4143. :li.
  4144. :li.
  4145. :lm margin=7.:hp2.Single:ehp2.:lm margin=21.from -3&per.402823e+38 to -1&per.401298e-45, 0&per.0, 1&per.401298e-45 to 
  4146. 3&per.402823466e+38:lm margin=1.
  4147. :li.
  4148. :li.
  4149. :lm margin=7.:rm margin=-2.:hp2.Double:ehp2.:lm margin=21.from -1&per.797693134862315d+308 to -4&per.94065645841247d-308, 
  4150. 0&per.0, 2&per.2250738585072014d-308 to 1&per.797693134862315d+308:lm margin=1.:rm margin=1.
  4151. :li.
  4152. :li.
  4153. Numeric values are always signed&per.
  4154. :li.
  4155. :li.
  4156. Basic has no true boolean variables&per.  BASIC considers 0 to be FALSE and any 
  4157. other numeric value to be TRUE&per.  Only numeric values can be used as booleans&per.  
  4158. Comparison operator expressions always return 0 for FALSE and -1 for TRUE&per.
  4159. :li.
  4160. :li.
  4161. Integer constants can be expressed in decimal, octal, or hexadecimal notation&per.  
  4162. Decimal constants are expressed by simply using the decimal representation&per.  To 
  4163. represent an octal value, precede the constant with "&.O" or "&.o" (e&per.g&per., &.o177)&per. 
  4164.  To represent a hexadecimal value, precede the constant with "&.H" or "&.h" 
  4165. (e&per.g&per., &.H8001)&per.
  4166. :li.
  4167. :li.
  4168. :li.
  4169. :hp2.Strings:ehp2.
  4170. :li.
  4171. :li.
  4172. BASIC strings can be either fixed or dynamic&per.  Fixed strings have a length 
  4173. specified when they are defined, and the length cannot be changed&per.  Fixed 
  4174. strings cannot be of 0 length&per.  Dynamic strings have no specified length&per. Any 
  4175. string can vary in length from 0 to 32,767 characters&per.  There are no 
  4176. restrictions on the characters which can be included in a string&per.  For example, 
  4177. the character whose ANSI value is 0 can be embedded in strings&per.
  4178. :li.
  4179. :li.
  4180. :li.
  4181. :hp2.Records:ehp2.
  4182. :li.
  4183. :li.
  4184. A record, or record variable, is a data structure containing one or more 
  4185. elements, each of which has a value&per.  Before declaring a record variable, a :link reftype=hd res=12560.:hp7.Type:ehp7.:elink.
  4186.  must be defined&per.  Once the :hp2.Type :ehp2.is defined, the variable can be declared to be 
  4187. of that type&per.  The variable name should not have a type character suffix&per.  
  4188. :li.
  4189. :li.
  4190. Record elements are referenced using dot notation, e&per.g&per., :hp1.varname&per.elementname:ehp1.&per.  
  4191. Records can contain elements which are themselves records&per.
  4192. :li.
  4193. :li.
  4194. :li.
  4195. :hp2.Arrays:ehp2.
  4196. :li.
  4197. :li.
  4198. Arrays are created by specifying one or more subscripts at declaration or :link reftype=hd res=12087.:hp7.Redim:ehp7.:elink. 
  4199. time&per.  Subscripts specifies the beginning and ending index for each dimension&per.  
  4200. If only an ending index is specified, the beginning index depends on the :link reftype=hd res=12073.:hp7.Option 
  4201. Base:ehp7.:elink. setting&per.  Array elements are referenced by enclosing the proper number of 
  4202. index values in parentheses after the array name, e&per.g&per. :hp1.arrayname(i,j,k):ehp1.&per.
  4203. :li.
  4204. :li.
  4205. See the :link reftype=hd res=10600.:hp7.Dim:ehp7.:elink. statement for more information&per.
  4206. :li.
  4207. :li.
  4208. :li.
  4209. :hp2.Conversions:ehp2.
  4210. :li.
  4211. :li.
  4212. BASIC will automatically convert data between any two numeric types&per.  When 
  4213. converting from a larger type to a smaller type (for example :hp2.Long:ehp2. to :hp2.Integer:ehp2.), 
  4214. a runtime numeric overflow may occur&per.  This indicates that the number of the 
  4215. larger type is too large for the target data type&per.  Loss of precision is not a 
  4216. runtime error (e&per.g&per., when converting from :hp2.Double:ehp2. to :hp2.Single:ehp2., or from either 
  4217. float type to either integer type)&per.
  4218. :li.
  4219. :li.
  4220. BASIC will also automatically convert between fixed strings and dynamic 
  4221. strings&per.  When converting a fixed string to dynamic, a dynamic string which has 
  4222. the same length and contents as the fixed string will be created&per.  When 
  4223. converting from a dynamic string to a fixed string, some adjustment may be 
  4224. required&per.  If the dynamic string is shorter than the fixed string, the 
  4225. resulting fixed string will be extended with spaces&per.  If the dynamic string is 
  4226. longer than the fixed string, the resulting fixed string will be a truncated 
  4227. version of the dynamic string&per.  No runtime errors are caused by string 
  4228. conversions&per.
  4229. :li.
  4230. :li.
  4231. No other implicit conversions are supported&per.  In particular, BASIC will not 
  4232. automatically convert between numeric and string data&per.  Use the functions :link reftype=hd res=12700.:hp7.Val:ehp7.:elink. 
  4233. and :link reftype=hd res=12400.:hp7.Str$:ehp7.:elink. for such conversions&per.
  4234. :li.
  4235. :li.
  4236. :esl.
  4237. :efn.
  4238. :h1 x=right y=bottom width=50% height=100% res=20200.Abstract Data Types
  4239. :i1 id=ix179.Abstract Data Type
  4240. :i2 refid=ix39.Abstract Data Types
  4241. :i2 refid=ix178.Abstract Data Types
  4242. :sl compact.
  4243. :li.
  4244. :hp2.Application Data Types (ADTs):ehp2.
  4245. :li.
  4246. :li.
  4247. Application Data Types are specific to each application that embeds SBL&per.    ADT 
  4248. variables have the appearance of standard Basic records&per.  The main difference 
  4249. is that they can be dynamic; creating, modifying or querying the ADT or its 
  4250. elements will cause application-specific actions to occur&per.  ADT variables and 
  4251. arrays are declared just like any other variable, using the :hp2.Dim:ehp2. or :hp2.Global:ehp2. 
  4252. statements&per.
  4253. :li.
  4254. :li.
  4255. :esl.
  4256. :h1 x=right y=bottom width=50% height=100% res=20300.Dialog Box Records
  4257. :i2 refid=ix14.Dialog Box Records
  4258. :i2 refid=ix67.Dialog Box Records
  4259. :sl compact.
  4260. :hp2.Dialog Box Records:ehp2.
  4261. :li.
  4262. Dialog box records look like any other user-defined data type&per.  Elements are 
  4263. referenced using the same :hp1.recname&per.elementname:ehp1. syntax&per.  The difference is that 
  4264. each element is tied to an element of a dialog box&per.  Some dialog boxes are 
  4265. defined by the application, others by the user&per.  See :link reftype=hd res=10115.:hp7.Begin Dialog:ehp7.:elink. statement for 
  4266. more information&per.
  4267. :li.
  4268. :li.
  4269. :esl.
  4270. :h1 x=right y=bottom width=50% height=100% res=1.Trappable Errors
  4271. :i2 refid=ix76.Trappable Errors
  4272. :i1 id=ix180.Trappable Errors
  4273. :sl compact.
  4274. :hp2.Trappable Errors:ehp2.
  4275. :li.
  4276. The following table lists the runtime errors which SBL returns&per.  These errors 
  4277. can be trapped by :link reftype=hd res=12060.:hp7.OnError:ehp7.:elink.&per.  The :link reftype=hd res=10645.:hp7.Err:ehp7.:elink. function can be used to query the error 
  4278. code, and the :link reftype=hd res=10655.:hp7.Error$:ehp7.:elink. function can be used to query the error text&per.
  4279. :li.
  4280. :li.
  4281. :lm margin=7.:rm margin=7.:hp2.Error code:ehp2.:lm margin=28.:hp2.Error :lm margin=7.Text:ehp2.:lm margin=1.:rm margin=1.
  4282. :li.
  4283. :li.
  4284. :lm margin=7.:rm margin=7.5:lm margin=28.Illegal function call:lm margin=1.:rm margin=1.
  4285. :li.
  4286. :lm margin=7.:rm margin=7.6:lm margin=28.Overflow:lm margin=1.:rm margin=1.
  4287. :li.
  4288. :lm margin=7.:rm margin=7.7:lm margin=28.Out of memory:lm margin=1.:rm margin=1.
  4289. :li.
  4290. :lm margin=7.:rm margin=7.9:lm margin=28.Subscript out of range:lm margin=1.:rm margin=1.
  4291. :li.
  4292. :lm margin=7.:rm margin=7.10:lm margin=28.Duplicate definition:lm margin=1.:rm margin=1.
  4293. :li.
  4294. :lm margin=7.:rm margin=7.11:lm margin=28.Division by zero:lm margin=1.:rm margin=1.
  4295. :li.
  4296. :lm margin=7.:rm margin=7.14:lm margin=28.Out of string space:lm margin=1.:rm margin=1.
  4297. :li.
  4298. :lm margin=7.:rm margin=7.19:lm margin=28.No Resume:lm margin=1.:rm margin=1.
  4299. :li.
  4300. :lm margin=7.:rm margin=7.20:lm margin=28.Resume without error:lm margin=1.:rm margin=1.
  4301. :li.
  4302. :lm margin=7.:rm margin=7.28:lm margin=28.Out of stack space:lm margin=1.:rm margin=1.
  4303. :li.
  4304. :lm margin=7.:rm margin=7.35:lm margin=28.Sub or Function not defined:lm margin=1.:rm margin=1.
  4305. :li.
  4306. :lm margin=7.:rm margin=7.48:lm margin=28.Error in loading DLL:lm margin=1.:rm margin=1.
  4307. :li.
  4308. :lm margin=7.:rm margin=7.52:lm margin=28.Bad file name or number:lm margin=1.:rm margin=1.
  4309. :li.
  4310. :lm margin=7.:rm margin=7.53:lm margin=28.File not found:lm margin=1.:rm margin=1.
  4311. :li.
  4312. :lm margin=7.:rm margin=7.54:lm margin=28.Bad file mode:lm margin=1.:rm margin=1.
  4313. :li.
  4314. :lm margin=7.:rm margin=7.55:lm margin=28.File already open:lm margin=1.:rm margin=1.
  4315. :li.
  4316. :lm margin=7.:rm margin=7.58:lm margin=28.File already exists:lm margin=1.:rm margin=1.
  4317. :li.
  4318. :lm margin=7.:rm margin=7.61:lm margin=28.Disk full:lm margin=1.:rm margin=1.
  4319. :li.
  4320. :lm margin=7.:rm margin=7.62:lm margin=28.Input past end of file:lm margin=1.:rm margin=1.
  4321. :li.
  4322. :lm margin=7.:rm margin=7.63:lm margin=28.Bad record number:lm margin=1.:rm margin=1.
  4323. :li.
  4324. :lm margin=7.:rm margin=7.64:lm margin=28.Bad file name:lm margin=1.:rm margin=1.
  4325. :li.
  4326. :lm margin=7.:rm margin=7.68:lm margin=28.Device unavailable:lm margin=1.:rm margin=1.
  4327. :li.
  4328. :lm margin=7.:rm margin=7.71:lm margin=28.Disk not ready:lm margin=1.:rm margin=1.
  4329. :li.
  4330. :lm margin=7.:rm margin=7.74:lm margin=28.Can't rename with different drive:lm margin=1.:rm margin=1.
  4331. :li.
  4332. :lm margin=7.:rm margin=7.75:lm margin=28.Path/File access error:lm margin=1.:rm margin=1.
  4333. :li.
  4334. :lm margin=7.:rm margin=7.76:lm margin=28.Path not found:lm margin=1.:rm margin=1.
  4335. :li.
  4336. :lm margin=7.:rm margin=7.102:lm margin=28.Command failed:lm margin=1.:rm margin=1.
  4337. :li.
  4338. :lm margin=7.:rm margin=7.901:lm margin=28.Input buffer would be larger than 64K:lm margin=1.:rm margin=1.
  4339. :li.
  4340. :lm margin=7.:rm margin=7.902:lm margin=28.Operating system error:lm margin=1.:rm margin=1.
  4341. :li.
  4342. :lm margin=7.:rm margin=7.903:lm margin=28.External procedure not found:lm margin=1.:rm margin=1.
  4343. :li.
  4344. :lm margin=7.:rm margin=7.904:lm margin=28.Global variable type mismatch:lm margin=1.:rm margin=1.
  4345. :li.
  4346. :lm margin=7.:rm margin=7.905:lm margin=28.User-defined type mismatch:lm margin=1.:rm margin=1.
  4347. :li.
  4348. :lm margin=7.:rm margin=7.906:lm margin=28.External procedure interface mismatch:lm margin=1.:rm margin=1.
  4349. :li.
  4350. :lm margin=7.:rm margin=7.907:lm margin=28.Pushbutton required:lm margin=1.:rm margin=1.
  4351. :li.
  4352. :lm margin=7.:rm margin=7.908:lm margin=28.Module has no MAIN:lm margin=1.:rm margin=1.
  4353. :li.
  4354. :lm margin=7.:rm margin=7.910:lm margin=28.Dialog box not declared:lm margin=1.:rm margin=1.
  4355. :li.
  4356. :esl.
  4357. :h1 x=right y=bottom width=50% height=100% res=30000.Glossary
  4358. :i1 id=ix181.Glossary
  4359. :sl compact.
  4360. Glossary
  4361. :li.
  4362. :li.
  4363. :link reftype=fn refid=callByReference.:hp5.call by reference:ehp5.:elink.
  4364. :li.
  4365. :li.
  4366. :link reftype=fn refid=callByValue.:hp5.call by value:ehp5.:elink.
  4367. :li.
  4368. :li.
  4369. :link reftype=fn refid=comment.:hp5.comment:ehp5.:elink.
  4370. :li.
  4371. :li.
  4372. :link reftype=fn refid=glos_function.:hp5.function:ehp5.:elink.
  4373. :li.
  4374. :li.
  4375. :link reftype=fn refid=glos_label.:hp5.label:ehp5.:elink.
  4376. :li.
  4377. :li.
  4378. :link reftype=fn refid=metacommand.:hp5.metacommands:ehp5.:elink.
  4379. :li.
  4380. :li.
  4381. :link reftype=fn refid=glos_name.:hp5.name:ehp5.:elink.
  4382. :li.
  4383. :li.
  4384. :link reftype=fn refid=sbl.:hp5.SBL:ehp5.:elink.
  4385. :li.
  4386. :li.
  4387. :link reftype=fn refid=subprogram.:hp5.subprogram:ehp5.:elink.
  4388. :li.
  4389. :li.
  4390. :link reftype=fn refid=typeCharacter.:hp5.type character:ehp5.:elink.
  4391. :li.
  4392. :li.
  4393. :esl.
  4394. :fn id=callByReference.
  4395. :sl compact.
  4396. :hp2.call by reference:ehp2.
  4397. :li.
  4398. :li.
  4399. Arguments passed by reference to a procedure may be modified by the procedure&per.  
  4400. Procedures written in BASIC are defined to receive their arguments by 
  4401. reference&per.  If you call such a procedure and pass it a variable, and if the 
  4402. procedure modifies its corresponding formal parameter, it will modify the 
  4403. variable&per.  Passing an expression by reference is legal in BASIC; if the called 
  4404. procedure modifies its corresponding parameter, a temporary value will be 
  4405. modified, with no apparent effect on the caller&per.
  4406. :li.
  4407. :li.
  4408. :esl.
  4409. :efn.
  4410. :fn id=callByValue.
  4411. :sl compact.
  4412. :hp2.call by value:ehp2.
  4413. :li.
  4414. :li.
  4415. When an arguments is passed by value to a procedure, the called procedure 
  4416. receives a copy of the argument&per.  If the called procedure modifies its 
  4417. corresponding formal parameter, it will have no effect on the caller&per.  
  4418. Procedures written in other languages such as C may receive their arguments by 
  4419. value&per.
  4420. :li.
  4421. :li.
  4422. :esl.
  4423. :efn.
  4424. :fn id=comment.
  4425. :sl compact.
  4426. :hp2.comment:ehp2.
  4427. :li.
  4428. :li.
  4429. A comment is text which documents the program&per.  Comments have no effect on the 
  4430. program (except for metacommands)&per.  In BASIC, a comment begins with a single 
  4431. quote, and continues to the end of the line&per.  If the first character in a 
  4432. comment is a dollar sign ($), the comment will be interpreted as a metacommand&per. 
  4433.  Lines beginning with the keyword :hp2.Rem:ehp2. are also interpreted as comments&per.
  4434. :li.
  4435. :li.
  4436. :esl.
  4437. :efn.
  4438. :fn id=glos_function.
  4439. :sl compact.
  4440. :hp2.function:ehp2.
  4441. :li.
  4442. :li.
  4443. A procedure which returns a value&per.  In BASIC, the return value is specified by 
  4444. assigning a value to the name of the function, as if the function were a 
  4445. variable&per.
  4446. :li.
  4447. :li.
  4448. :esl.
  4449. :efn.
  4450. :fn id=glos_label.
  4451. :sl compact.
  4452. :hp2.label:ehp2.
  4453. :li.
  4454. :li.
  4455. A label identifies a position in the program at which to continue execution, 
  4456. usually as a result of executing a :hp2.GoTo:ehp2. statement&per.  To be recognized as a 
  4457. label, a name must begin in the first column, and must be immediately followed 
  4458. by a colon ("&colon.")&per.  Reserved words are not valid labels&per.
  4459. :li.
  4460. :li.
  4461. :esl.
  4462. :efn.
  4463. :fn id=metacommand.
  4464. :sl compact.
  4465. :hp2.metacommand:ehp2.
  4466. :li.
  4467. :li.
  4468. A metacommand is a command which gives the compiler instructions on how to 
  4469. build the program&per.  In BASIC, metacommands are specified in comments which 
  4470. begin with a dollar sign ($)&per.
  4471. :li.
  4472. :li.
  4473. :esl.
  4474. :efn.
  4475. :fn id=glos_name.
  4476. :sl compact.
  4477. :hp2.name:ehp2.
  4478. :li.
  4479. :li.
  4480. A BASIC name must start with a letter (A through Z)&per.  The remaining part of a 
  4481. name can also contain numeric digits (0 through 9) or an underscore character 
  4482. (_)&per.  A name cannot be longer than 40 characters in length&per.  Type characters 
  4483. are not considered part of a name&per.
  4484. :li.
  4485. :li.
  4486. :esl.
  4487. :efn.
  4488. :fn id=sbl.
  4489. :sl compact.
  4490. :hp2.SBL:ehp2.
  4491. :li.
  4492. :li.
  4493. The acronym for the Softbridge Basic Language (SBL) is pronounced as "sibyl"&per.
  4494. :li.
  4495. :li.
  4496. :esl.
  4497. :efn.
  4498. :fn id=subprogram.
  4499. :sl compact.
  4500. :hp2.subprogram:ehp2.
  4501. :li.
  4502. :li.
  4503. A procedure which does not return a value&per.
  4504. :li.
  4505. :li.
  4506. :esl.
  4507. :efn.
  4508. :h1 x=right y=bottom width=50% height=100% res=4 hide.No Title for this topic
  4509. :sl compact.
  4510. :hp2.type character:ehp2.
  4511. :li.
  4512. :li.
  4513. A special character used as a suffix to a name of a function or variable&per. The 
  4514. character defines the data type of the variable or function&per.  The characters 
  4515. are&colon.
  4516. :li.
  4517. :li.
  4518. :lm margin=7.Dynamic :hp2.String:ehp2.:lm margin=30.$:lm margin=1.
  4519. :li.
  4520. :lm margin=7.:hp2.Integer:ehp2.:lm margin=30.%:lm margin=1.
  4521. :li.
  4522. :lm margin=7.:hp2.Long:ehp2. integer:lm margin=30.&.:lm margin=1.
  4523. :li.
  4524. :lm margin=7.:hp2.Single:ehp2. floating point:lm margin=30.!:lm margin=1.
  4525. :li.
  4526. :lm margin=7.:hp2.Double:ehp2. floating point:lm margin=30.#:lm margin=1.
  4527. :li.
  4528. :lm margin=1.:li.
  4529. :li.
  4530. :esl.
  4531. :fn id=typeCharacter.
  4532. :sl compact.
  4533. :hp2.type character:ehp2.
  4534. :li.
  4535. :li.
  4536. A special character used as a suffix to a name of a function or variable&per. The 
  4537. character defines the data type of the variable or function&per.  The characters 
  4538. are&colon.
  4539. :li.
  4540. :li.
  4541. :lm margin=7.Dynamic :hp2.String:ehp2.:lm margin=30.$:lm margin=1.
  4542. :li.
  4543. :lm margin=7.:hp2.Integer:ehp2.:lm margin=30.%:lm margin=1.
  4544. :li.
  4545. :lm margin=7.:hp2.Long:ehp2. integer:lm margin=30.&.:lm margin=1.
  4546. :li.
  4547. :lm margin=7.:hp2.Single:ehp2. floating point:lm margin=30.!:lm margin=1.
  4548. :li.
  4549. :lm margin=7.:hp2.Double:ehp2. floating point:lm margin=30.#:lm margin=1.
  4550. :li.
  4551. :lm margin=1.:li.
  4552. :li.
  4553. :esl.
  4554. :efn.
  4555. :euserdoc.
  4556.