blitz.bmx 35 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406
  1. SuperStrict
  2. NoDebug
  3. Rem
  4. bbdoc: BASIC/BlitzMax runtime
  5. End Rem
  6. Module BRL.Blitz
  7. ModuleInfo "Version: 1.26"
  8. ModuleInfo "Author: Mark Sibly"
  9. ModuleInfo "License: zlib/libpng"
  10. ModuleInfo "Copyright: Blitz Research Ltd"
  11. ModuleInfo "Modserver: BRL"
  12. '
  13. ModuleInfo "History: 1.26"
  14. ModuleInfo "History: Added extended string to number conversion methods"
  15. ModuleInfo "History: 1.25"
  16. ModuleInfo "History: Added suport for risc-v"
  17. ModuleInfo "History: 1.24"
  18. ModuleInfo "History: Update to bdwgc 8.3.0.04d7f70"
  19. ModuleInfo "History: 1.23"
  20. ModuleInfo "History: Update to bdwgc 8.2.0.ea9845c"
  21. ModuleInfo "History: 1.22"
  22. ModuleInfo "History: Update to bdwgc 8.1.0.fbcdf44"
  23. ModuleInfo "History: 1.21"
  24. ModuleInfo "History: Update to bdwgc 7.7.0.d76816e"
  25. ModuleInfo "History: 1.20"
  26. ModuleInfo "History: Update to bdwgc 7.7.0."
  27. ModuleInfo "History: 1.19"
  28. ModuleInfo "History: Added interfaces."
  29. ModuleInfo "History: Added Interface and EndInterface keyword docs"
  30. ModuleInfo "History: 1.18"
  31. ModuleInfo "History: WriteStdout and WriteStderr now write UTF-8"
  32. ModuleInfo "History: 1.17 Release"
  33. ModuleInfo "History: Added kludges for Lion llvm"
  34. ModuleInfo "History: Removed Nan/Inf"
  35. ModuleInfo "History: 1.16 Release"
  36. ModuleInfo "History: String.Find now converts start index <0 to 0"
  37. ModuleInfo "History: 1.15 Release"
  38. ModuleInfo "History: Changed ReadStdin so it can handle any length input"
  39. ModuleInfo "History: 1.14 Release"
  40. ModuleInfo "History: Fixed leak in WriteStdout and WriteStderr"
  41. ModuleInfo "History: 1.13 Release"
  42. ModuleInfo "History: Added LibStartUp stub"
  43. ModuleInfo "History: 1.12 Release"
  44. ModuleInfo "History: Added GCSuspend and GCResume"
  45. ModuleInfo "History: 1.11 Release"
  46. ModuleInfo "History: Added experimental dll support"
  47. ModuleInfo "History: 1.10 Release"
  48. ModuleInfo "History: Added Nan and Inf keyword docs"
  49. ModuleInfo "History: 1.09 Release"
  50. ModuleInfo "History: BCC extern CString fix"
  51. ModuleInfo "History: 1.08 Release"
  52. ModuleInfo "History: Removed printf from 'Throw'"
  53. ModuleInfo "History: 1.07 Release"
  54. ModuleInfo "History: Added AppTitle$ global var"
  55. ModuleInfo "History: 1.06 Release"
  56. ModuleInfo "History: Restored ReadData"
  57. ModuleInfo "History: 1.05 Release"
  58. ModuleInfo "History: Lotsa little tidyups"
  59. ModuleInfo "History: 1.04 Release"
  60. ModuleInfo "History: Fixed C Compiler warnings"
  61. ?win32
  62. ModuleInfo "CC_OPTS: -DGC_THREADS -DPARALLEL_MARK -DATOMIC_UNCOLLECTABLE -DLARGE_CONFIG -DUSE_MMAP -DUSE_MUNMAP -DMUNMAP_THRESHOLD=3"
  63. ?osx
  64. ModuleInfo "CC_OPTS: -DGC_THREADS -DPARALLEL_MARK -DATOMIC_UNCOLLECTABLE -DLARGE_CONFIG -DUSE_MMAP -DUSE_MUNMAP -DMUNMAP_THRESHOLD=3"
  65. ?linuxx86
  66. ModuleInfo "CC_OPTS: -DGC_THREADS -D_REENTRANT -DPARALLEL_MARK -DATOMIC_UNCOLLECTABLE -DLARGE_CONFIG -DUSE_MMAP -DUSE_MUNMAP -DMUNMAP_THRESHOLD=3"
  67. ?linuxx64
  68. ModuleInfo "CC_OPTS: -DGC_THREADS -D_REENTRANT -DPARALLEL_MARK -DATOMIC_UNCOLLECTABLE -DLARGE_CONFIG -DUSE_MMAP -DUSE_MUNMAP -DMUNMAP_THRESHOLD=3"
  69. ?linuxarm64 and not raspberrypi
  70. ModuleInfo "CC_OPTS: -DGC_THREADS -D_REENTRANT -DPARALLEL_MARK -DATOMIC_UNCOLLECTABLE -DLARGE_CONFIG -DUSE_MMAP -DUSE_MUNMAP -DMUNMAP_THRESHOLD=3"
  71. ?linuxarm and not raspberrypi
  72. ModuleInfo "CC_OPTS: -DGC_THREADS -D_REENTRANT -DPARALLEL_MARK -DATOMIC_UNCOLLECTABLE -DLARGE_CONFIG -DUSE_MMAP -DUSE_MUNMAP -DMUNMAP_THRESHOLD=3"
  73. ?linuxriscv32
  74. ModuleInfo "CC_OPTS: -DGC_THREADS -D_REENTRANT -DPARALLEL_MARK -DATOMIC_UNCOLLECTABLE -DLARGE_CONFIG -DUSE_MMAP -DUSE_MUNMAP -DMUNMAP_THRESHOLD=3"
  75. ?linuxriscv64
  76. ModuleInfo "CC_OPTS: -DGC_THREADS -D_REENTRANT -DPARALLEL_MARK -DATOMIC_UNCOLLECTABLE -DLARGE_CONFIG -DUSE_MMAP -DUSE_MUNMAP -DMUNMAP_THRESHOLD=3"
  77. ?raspberrypi
  78. ModuleInfo "CC_OPTS: -DGC_THREADS -D_REENTRANT -DPARALLEL_MARK -DATOMIC_UNCOLLECTABLE -DUSE_MMAP -DUSE_MUNMAP -DMUNMAP_THRESHOLD=3"
  79. ?android
  80. ModuleInfo "CC_OPTS: -DGC_THREADS -D_REENTRANT -DATOMIC_UNCOLLECTABLE"
  81. ?emscripten
  82. ModuleInfo "CC_OPTS: -DATOMIC_UNCOLLECTABLE"
  83. ?ios
  84. ModuleInfo "CC_OPTS: -DGC_THREADS -DATOMIC_UNCOLLECTABLE -DNO_DYLD_BIND_FULLY_IMAGE"
  85. ?musl
  86. ModuleInfo "CC_OPTS: -DNO_GETCONTEXT"
  87. ?nx
  88. ModuleInfo "CC_OPTS: -DATOMIC_UNCOLLECTABLE -DNN_BUILD_TARGET_PLATFORM_NX"
  89. ?haiku
  90. ModuleInfo "CC_OPTS: -DGC_THREADS -DPARALLEL_MARK -DATOMIC_UNCOLLECTABLE -DLARGE_CONFIG -DUSE_MMAP -DUSE_MUNMAP -DMUNMAP_THRESHOLD=3"
  91. ?
  92. ModuleInfo "CC_OPTS: -DJAVA_FINALIZATION -DNO_EXECUTE_PERMISSION"
  93. ?debug
  94. ModuleInfo "CC_OPTS: -DBMX_DEBUG"
  95. ?
  96. ' c++11 required for fast float
  97. ModuleInfo "CPP_OPTS: -std=c++11"
  98. ' uncomment to enable allocation counting
  99. 'ModuleInfo "CC_OPTS: -DBBCC_ALLOCCOUNT"
  100. Import "blitz_app.c"
  101. Import "blitz_types.c"
  102. Import "blitz_cclib.c"
  103. Import "blitz_memory.c"
  104. Import "blitz_module.c"
  105. Import "blitz_object.c"
  106. Import "blitz_string.c"
  107. Import "blitz_array.c"
  108. Import "blitz_handle.c"
  109. Import "blitz_debug.c"
  110. Import "blitz_incbin.c"
  111. Import "blitz_thread.c"
  112. Import "blitz_ex.c"
  113. Import "blitz_gc.c"
  114. Import "blitz_unicode.c"
  115. Import "blitz_enum.c"
  116. Import "blitz_coverage.c"
  117. Import "blitz_string_ex.cpp"
  118. ?coverage
  119. Import "hashmap/hashmap.c"
  120. ?
  121. '?Threaded
  122. 'Import "blitz_gc_ms.c"
  123. '?Not Threaded
  124. 'Import "blitz_gc_rc.c"
  125. '?
  126. '?Win32X86
  127. 'Import "blitz_ex.win32.x86.s"
  128. 'Import "blitz_gc.win32.x86.s"
  129. 'Import "blitz_ftoi.win32.x86.s"
  130. '?LinuxX86
  131. 'Import "blitz_ex.linux.x86.s"
  132. 'Import "blitz_gc.linux.x86.s"
  133. 'Import "blitz_ftoi.linux.x86.s"
  134. '?MacosX86
  135. 'Import "blitz_ex.macos.x86.s"
  136. 'Import "blitz_gc.macos.x86.s"
  137. 'Import "blitz_ftoi.macos.x86.s"
  138. '?MacosPPC
  139. 'Import "blitz_ex.macos.ppc.s"
  140. 'Import "blitz_gc.macos.ppc.s"
  141. '?
  142. Import "bdwgc/include/*.h"
  143. Import "bdwgc/libatomic_ops/src/*.h"
  144. Import "bdwgc/reclaim.c"
  145. Import "bdwgc/allchblk.c"
  146. Import "bdwgc/misc.c"
  147. Import "bdwgc/alloc.c"
  148. Import "bdwgc/mach_dep.c"
  149. Import "bdwgc/os_dep.c"
  150. Import "bdwgc/mark_rts.c"
  151. Import "bdwgc/headers.c"
  152. Import "bdwgc/mark.c"
  153. Import "bdwgc/obj_map.c"
  154. Import "bdwgc/blacklst.c"
  155. Import "bdwgc/finalize.c"
  156. Import "bdwgc/new_hblk.c"
  157. Import "bdwgc/dyn_load.c"
  158. Import "bdwgc/dbg_mlc.c"
  159. Import "bdwgc/malloc.c"
  160. Import "bdwgc/checksums.c"
  161. Import "bdwgc/pthread_start.c"
  162. Import "bdwgc/pthread_support.c"
  163. Import "bdwgc/pthread_stop_world.c"
  164. Import "bdwgc/darwin_stop_world.c"
  165. Import "bdwgc/typd_mlc.c"
  166. Import "bdwgc/ptr_chck.c"
  167. Import "bdwgc/mallocx.c"
  168. Import "bdwgc/gcj_mlc.c"
  169. Import "bdwgc/specific.c"
  170. Import "bdwgc/gc_dlopen.c"
  171. Import "bdwgc/backgraph.c"
  172. Import "bdwgc/win32_threads.c"
  173. Import "bdwgc/thread_local_alloc.c" 'bdwgc only? not gc6.7
  174. ?nx
  175. Import "blitz_nx.c"
  176. ?
  177. Import "tree/tree.c"
  178. Include "builtin.bmx"
  179. Include "iterator.bmx"
  180. Include "comparator.bmx"
  181. Extern
  182. Global OnDebugStop()="bbOnDebugStop"
  183. Global OnDebugLog( message:String )="bbOnDebugLog"
  184. End Extern
  185. Rem
  186. bbdoc: Exception
  187. about: Common base class of the built-in exceptions of the language.
  188. End Rem
  189. Type TBlitzException
  190. End Type
  191. Rem
  192. bbdoc: Null object exception
  193. about: Thrown when a field or method of a Null object is accessed. (only in debug mode)
  194. End Rem
  195. Type TNullObjectException Extends TBlitzException
  196. Method ToString:String() Override
  197. Return "Attempt to access field or method of Null object"
  198. End Method
  199. End Type
  200. Rem
  201. bbdoc: Null method exception
  202. about: Thrown when an abstract method is called.
  203. End Rem
  204. Type TNullMethodException Extends TBlitzException
  205. Method ToString:String() Override
  206. Return "Attempt to call abstract method"
  207. End Method
  208. End Type
  209. Rem
  210. bbdoc: Null function exception
  211. about: Thrown when an uninitialized function pointer is called.
  212. End Rem
  213. Type TNullFunctionException Extends TBlitzException
  214. Method ToString:String() Override
  215. Return "Attempt to call uninitialized function pointer"
  216. End Method
  217. End Type
  218. Rem
  219. bbdoc: Array bounds exception
  220. about: Thrown when an array element with an index outside the valid range of the array (0 to array.length-1) is accessed. (only in debug mode)
  221. End Rem
  222. Type TArrayBoundsException Extends TBlitzException
  223. Method ToString:String() Override
  224. Return "Attempt to index array element beyond array length"
  225. End Method
  226. End Type
  227. Rem
  228. bbdoc: Out of data exception
  229. about: Thrown when #ReadData is used but not enough data is left to read. (only in debug mode)
  230. End Rem
  231. Type TOutOfDataException Extends TBlitzException
  232. Method ToString:String() Override
  233. Return "Attempt to read beyond end of data"
  234. End Method
  235. End Type
  236. Rem
  237. bbdoc: Runtime exception
  238. about: Thrown by #RuntimeError.
  239. End Rem
  240. Type TRuntimeException Extends TBlitzException
  241. Field error:String
  242. Method New(error:String)
  243. Self.error = error
  244. End Method
  245. Method ToString:String() Override
  246. Return error
  247. End Method
  248. End Type
  249. Rem
  250. bbdoc: Invalid enum exception
  251. about: Thrown when attempting to cast an invalid value to an #Enum. (only in debug mode)
  252. End Rem
  253. Type TInvalidEnumException Extends TBlitzException
  254. Method ToString:String() Override
  255. Return "Attempt to cast invalid value to Enum"
  256. End Method
  257. End Type
  258. Function NullObjectError()
  259. Throw New TNullObjectException
  260. End Function
  261. Function NullMethodError()
  262. Throw New TNullMethodException
  263. End Function
  264. Function NullFunctionError()
  265. Throw New TNullFunctionException
  266. End Function
  267. Function ArrayBoundsError()
  268. Throw New TArrayBoundsException
  269. End Function
  270. Function OutOfDataError()
  271. Throw New TOutOfDataException
  272. End Function
  273. Function InvalidEnumError()
  274. Throw New TInvalidEnumException
  275. End Function
  276. Rem
  277. bbdoc: Generate a runtime error
  278. about: Throws a #TRuntimeException.
  279. End Rem
  280. Function RuntimeError( message:String )
  281. Throw New TRuntimeException( message )
  282. End Function
  283. Rem
  284. bbdoc: Stop program execution and enter debugger
  285. about: If there is no debugger present, this command is ignored.
  286. end rem
  287. Function DebugStop()
  288. OnDebugStop
  289. End Function
  290. Rem
  291. bbdoc: Write a string to debug log
  292. about: If there is no debugger present, this command is ignored.
  293. end rem
  294. Function DebugLog( message:String )
  295. OnDebugLog message
  296. End Function
  297. Rem
  298. bbdoc: Enables parsing of scientific notation in extended string to number conversion methods.
  299. End Rem
  300. Const CHARSFORMAT_SCIENTIFIC:ULong = 1 Shl 0
  301. Rem
  302. bbdoc: Enables parsing of fixed point notation in extended string to number conversion methods.
  303. End Rem
  304. Const CHARSFORMAT_FIXED:ULong = 1 Shl 2
  305. Rem
  306. bbdoc: Enables parsing of hexadecimal notation in extended string to number conversion methods.
  307. End Rem
  308. Const CHARSFORMAT_HEX:ULong = 1 Shl 3
  309. Rem
  310. bbdoc: Do not allow Infinity or NaN in extended string to number conversion methods.
  311. End Rem
  312. Const CHARSFORMAT_NOINFNAN:ULong = 1 Shl 4
  313. Rem
  314. bbdoc: Enforces JSON number format in extended string to number conversion methods.
  315. End Rem
  316. Const CHARSFORMAT_JSON:ULong = 1 Shl 5 | CHARSFORMAT_FIXED | CHARSFORMAT_SCIENTIFIC | CHARSFORMAT_NOINFNAN
  317. Rem
  318. bbdoc: Parses JSON number format or Infinity or NaN in extended string to number conversion methods.
  319. End Rem
  320. Const CHARSFORMAT_JSONORINFNAN:ULong = 1 Shl 5 | CHARSFORMAT_FIXED | CHARSFORMAT_SCIENTIFIC
  321. Rem
  322. bbdoc: Allows parsing of Fortran-style numbers in extended string to number conversion methods.
  323. End Rem
  324. Const CHARSFORMAT_FORTRAN:ULong = 1 Shl 6 | CHARSFORMAT_FIXED | CHARSFORMAT_SCIENTIFIC
  325. Rem
  326. bbdoc: The default format for extended string to number conversion methods.
  327. End Rem
  328. Const CHARSFORMAT_GENERAL:ULong = CHARSFORMAT_FIXED | CHARSFORMAT_SCIENTIFIC
  329. Rem
  330. bbdoc: Allows leading plus sign in extended string to number conversion methods.
  331. End Rem
  332. Const CHARSFORMAT_ALLOWLEADINGPLUS:ULong = 1 Shl 7
  333. Rem
  334. bbdoc: Enables skipping leading whitespace in extended string to number conversion methods.
  335. End Rem
  336. Const CHARSFORMAT_SKIPWHITESPACE:ULong = 1 Shl 8
  337. Extern
  338. Rem
  339. bbdoc: Application directory
  340. about: The #AppDir global variable contains the fully qualified directory of the currently
  341. executing application. An application's initial current directory is also set to #AppDir
  342. when an application starts.
  343. In a compiled DLL, the #AppDir global variable will instead contain the fully qualified
  344. directory of the DLL.
  345. End Rem
  346. Global AppDir:String="bbAppDir"
  347. Rem
  348. bbdoc: Application file name
  349. about: The #AppFile global variable contains the fully qualified file name of the currently
  350. executing application.
  351. In a compiled DLL, the #AppFile global variable will instead contain the fully qualified
  352. file name of the DLL.
  353. End Rem
  354. Global AppFile:String="bbAppFile"
  355. Rem
  356. bbdoc: Application title
  357. about: The #AppTitle global variable is used by various commands when a
  358. default application title is required - for example, when opening simple
  359. windows or requesters.<br/>
  360. <br/>
  361. Initially, #AppTitle is set to the value "BlitzMax Application". However, you may change
  362. #AppTitle at any time with a simple assignment.
  363. End Rem
  364. Global AppTitle:String="bbAppTitle"
  365. Rem
  366. bbdoc: Arguments passed to the application at startup
  367. about: The #AppArgs global array contains the command line parameters sent to an application
  368. when it was started. The first element of #AppArgs always contains the name of the
  369. application. However, the format of the name may change depending on how the application
  370. was launched. Use #AppDir or #AppFile for consistent information about the applications name
  371. or directory.
  372. End Rem
  373. Global AppArgs:String[]="bbAppArgs"
  374. Rem
  375. bbdoc: Directory from which application was launched
  376. about: The #LaunchDir global variable contains the current directory at the time the
  377. application was launched. This is mostly of use to command line tools which may need to
  378. access the 'shell' current directory as opposed to the application directory.
  379. End Rem
  380. Global LaunchDir:String="bbLaunchDir"
  381. Rem
  382. bbdoc: Add a function to be called when the program ends
  383. about: #OnEnd allows you to specify a function to be called when the program ends. OnEnd functions are called
  384. in the reverse order to that in which they were added.
  385. end rem
  386. Function OnEnd( fun() )="bbOnEnd"
  387. Rem
  388. bbdoc: Read a string from stdin
  389. returns: A string read from stdin. The newline terminator, if any, is included in the returned string.
  390. end rem
  391. Function ReadStdin:String()="bbReadStdin"
  392. Rem
  393. bbdoc: Write a string to stdout
  394. about: Writes @str to stdout and flushes stdout.
  395. end rem
  396. Function WriteStdout( str:String )="bbWriteStdout"
  397. Rem
  398. bbdoc: Write a string to stderr
  399. about: Writes @str to stderr and flushes stderr.
  400. end rem
  401. Function WriteStderr( str:String )="bbWriteStderr"
  402. Rem
  403. bbdoc: Wait for a given number of milliseconds
  404. about:
  405. #Delay suspends program execution for at least @millis milliseconds.<br/>
  406. <br/>
  407. A millisecond is one thousandth of a second.
  408. End Rem
  409. Function Delay( millis:Int )="bbDelay"
  410. Rem
  411. bbdoc: Wait for a given number of microseconds
  412. about:
  413. #UDelay suspends program execution for at least @microcseconds.<br/>
  414. <br/>
  415. A microsecond is one millionth of a second.
  416. End Rem
  417. Function UDelay( microseconds:Int )="void bbUDelay(int)!"
  418. Rem
  419. bbdoc: Get millisecond counter
  420. returns: Milliseconds since computer turned on.
  421. about:
  422. #MilliSecs returns the number of milliseconds elapsed since the computer
  423. was turned on.<br/>
  424. <br/>
  425. A millisecond is one thousandth of a second.
  426. End Rem
  427. Function MilliSecs:Int()="bbMilliSecs"
  428. Rem
  429. bbdoc: Allocate memory
  430. returns: A new block of memory @size bytes long
  431. End Rem
  432. Function MemAlloc:Byte Ptr( size:Size_T )="void* bbMemAlloc( size_t )"
  433. Rem
  434. bbdoc: Free allocated memory
  435. about: The memory specified by @mem must have been previously allocated by #MemAlloc or #MemExtend.
  436. End Rem
  437. Function MemFree( mem:Byte Ptr )="void bbMemFree( void * )"
  438. Rem
  439. bbdoc: Extend a block of memory
  440. returns: A new block of memory @new_size bytes long
  441. about: An existing block of memory specified by @mem and @size is copied into a new block
  442. of memory @new_size bytes long. The existing block is released and the new block is returned.
  443. End Rem
  444. Function MemExtend:Byte Ptr( mem:Byte Ptr,size:Size_T,new_size:Size_T )="void* bbMemExtend( void *,size_t ,size_t )"
  445. Rem
  446. bbdoc: Clear a block of memory to 0
  447. End Rem
  448. Function MemClear( mem:Byte Ptr,size:Size_T )="void bbMemClear( void *,size_t )"
  449. Rem
  450. bbdoc: Copy a non-overlapping block of memory
  451. End Rem
  452. Function MemCopy( dst:Byte Ptr,src:Byte Ptr,size:Size_T )="void bbMemCopy( void *,const void *,size_t )"
  453. Rem
  454. bbdoc: Copy a potentially overlapping block of memory
  455. End Rem
  456. Function MemMove( dst:Byte Ptr,src:Byte Ptr,size:Size_T )="void bbMemMove( void *,const void *,size_t )"
  457. Rem
  458. bbdoc: Sets the garbage collector mode
  459. about:
  460. @mode can be one of the following:<br/>
  461. 1 : automatic GC - memory will be automatically garbage collected<br/>
  462. 2 : manual GC - no memory will be collected until a call to GCCollect is made<br/>
  463. <br/>
  464. The default GC mode is automatic GC.
  465. End Rem
  466. Function GCSetMode( Mode:Int )="bbGCSetMode"
  467. Rem
  468. bbdoc: Gets the garbage collector mode
  469. about:
  470. @mode can be one of the following:<br/>
  471. 1 : automatic GC - memory will be automatically garbage collected<br/>
  472. 2 : manual GC - no memory will be collected until a call to GCCollect is made<br/>
  473. <br/>
  474. The default GC mode is automatic GC.
  475. End Rem
  476. Function GCGetMode:Int()="bbGCGetMode"
  477. Rem
  478. bbdoc: Suspend garbage collector
  479. about:
  480. #GCSuspend temporarily suspends the garbage collector. No garbage
  481. collection will be performed following a call to #GCSuspend.<br/>
  482. <br/>
  483. Use #GCResume to resume the garbage collector. Note that #GCSuspend
  484. and #GCResume 'nest', meaning that each call to #GCSuspend must be
  485. matched by a call to #GCResume.
  486. End Rem
  487. Function GCSuspend()="bbGCSuspend"
  488. Rem
  489. bbdoc: Resume garbage collector
  490. about:
  491. #GCResume resumes garbage collection following a call to #GCSuspend.<br/>
  492. <br/>
  493. See #GCSuspend for more details.
  494. End Rem
  495. Function GCResume()="bbGCResume"
  496. Rem
  497. bbdoc: Run garbage collector
  498. returns: The amount of memory, in bytes, collected.
  499. about:
  500. This function will have no effect if the garbage collector has been
  501. suspended due to #GCSuspend.
  502. End Rem
  503. Function GCCollect:Size_T()="bbGCCollect"
  504. Rem
  505. bbdoc: Run garbage collector, collecting a little
  506. returns: Returns 0 if there is no more to collect.
  507. about:
  508. This function will have no effect if the garbage collector has been
  509. suspended due to #GCSuspend.
  510. End Rem
  511. Function GCCollectALittle:Int()="bbGCCollectALittle"
  512. Rem
  513. bbdoc: Memory allocated by application
  514. returns: The amount of memory, in bytes, currently allocated by the application
  515. about:
  516. This function only returns 'managed memory'. This includes all objects, strings and
  517. arrays in use by the application.
  518. End Rem
  519. Function GCMemAlloced:Size_T()="bbGCMemAlloced"
  520. Rem
  521. bbdoc: Private: do not use
  522. End Rem
  523. Function GCEnter()="bbGCEnter"
  524. Rem
  525. bbdoc: Private: do not use
  526. End Rem
  527. Function GCLeave()="bbGCLeave"
  528. Rem
  529. bbdoc: Retains a reference to the specified #Object, preventing it from being collected.
  530. End Rem
  531. Function GCRetain(obj:Object)="bbGCRetain"
  532. Rem
  533. bbdoc: Releases a reference from the specified #Object.
  534. End Rem
  535. Function GCRelease(obj:Object)="void bbGCRelease(BBObject*)!"
  536. Rem
  537. bbdoc: Returns #True if the current thread is registered with the garbage collector.
  538. End Rem
  539. Function GCThreadIsRegistered:Int()="bbGCThreadIsRegistered"
  540. Rem
  541. bbdoc: Registers the current thread with the garbage collector.
  542. returns: 0 on success, 1 if the thread was already registered, or -1 if threads are not supported.
  543. End Rem
  544. Function GCRegisterMyThread:Int()="bbGCRegisterMyThread"
  545. Rem
  546. bbdoc: Unregisters the previously registered current thread.
  547. about: Note, that any memory allocated by the garbage collector from the current thread will no longer be
  548. accessible after the thread is unregistered.
  549. End Rem
  550. Function GCUnregisterMyThread:Int()="bbGCUnregisterMyThread"
  551. Rem
  552. bbdoc: Structure for holding Garbage Collection statistics as provided by #GCGetStats().
  553. End Rem
  554. Struct SGCStats
  555. Rem
  556. bbdoc: Heap size in bytes (including the area unmapped to OS).
  557. End Rem
  558. ?win32 and ptr64
  559. Field heapsize:ULong
  560. ?not win32 or not ptr64
  561. Field heapsize:ULongInt
  562. ?
  563. Rem
  564. bbdoc: Total bytes contained in free and unmapped blocks.
  565. End Rem
  566. ?win32 and ptr64
  567. Field freeBytes:ULong
  568. ?not win32 or not ptr64
  569. Field freeBytes:ULongInt
  570. ?
  571. Rem
  572. bbdoc: Amount of memory unmapped to OS.
  573. End Rem
  574. ?win32 and ptr64
  575. Field unmappedBytes:ULong
  576. ?not win32 or not ptr64
  577. Field unmappedBytes:ULongInt
  578. ?
  579. Rem
  580. bbdoc: Number of bytes allocated since the recent collection.
  581. End Rem
  582. ?win32 and ptr64
  583. Field bytesAllocedSinceGC:ULong
  584. ?not win32 or not ptr64
  585. Field bytesAllocedSinceGC:ULongInt
  586. ?
  587. Rem
  588. bbdoc: Number of bytes allocated before the recent garbage collection.
  589. about: The value may wrap.
  590. End Rem
  591. ?win32 and ptr64
  592. Field allocedBytesBeforeGC:ULong
  593. ?not win32 or not ptr64
  594. Field allocedBytesBeforeGC:ULongInt
  595. ?
  596. Rem
  597. bbdoc: Number of bytes not considered candidates for garbage collection.
  598. End Rem
  599. ?win32 and ptr64
  600. Field nonGCBytes:ULong
  601. ?not win32 or not ptr64
  602. Field nonGCBytes:ULongInt
  603. ?
  604. Rem
  605. bbdoc: Garbage collection cycle number.
  606. about: The value may wrap (and could be -1).
  607. End Rem
  608. ?win32 and ptr64
  609. Field GCCycleNo:ULong
  610. ?not win32 or not ptr64
  611. Field GCCycleNo:ULongInt
  612. ?
  613. Rem
  614. bbdoc: Number of marker threads (excluding the initiating one).
  615. about: 0 if the collector is single-threaded.
  616. End Rem
  617. ?win32 and ptr64
  618. Field markersM1:ULong
  619. ?not win32 or not ptr64
  620. Field markersM1:ULongInt
  621. ?
  622. Rem
  623. bbdoc: Approximate number of reclaimed bytes after recent GC.
  624. End Rem
  625. ?win32 and ptr64
  626. Field bytesReclaimedSinceGC:ULong
  627. ?not win32 or not ptr64
  628. Field bytesReclaimedSinceGC:ULongInt
  629. ?
  630. Rem
  631. bbdoc: Approximate number of bytes reclaimed before the recent garbage collection.
  632. about: The value may wrap.
  633. End Rem
  634. ?win32 and ptr64
  635. Field reclaimedBytesBeforeGC:ULong
  636. ?not win32 or not ptr64
  637. Field reclaimedBytesBeforeGC:ULongInt
  638. ?
  639. Rem
  640. bbdoc: Number of bytes freed explicitly since the recent GC.
  641. End Rem
  642. ?win32 and ptr64
  643. Field freedBytesSinceGC:ULong
  644. ?not win32 or not ptr64
  645. Field freedBytesSinceGC:ULongInt
  646. ?
  647. Rem
  648. bbdoc: Total amount of memory obtained from OS, in bytes.
  649. End Rem
  650. ?win32 and ptr64
  651. Field obtainedFromOSBytes:ULong
  652. ?not win32 or not ptr64
  653. Field obtainedFromOSBytes:ULongInt
  654. ?
  655. End Struct
  656. Rem
  657. bbdoc: Retrieves GC statistics (various global counters), populating the provided #SGCStats struct.
  658. End Rem
  659. Function GCGetStats(stats:SGCStats Var)="void bbGCGetStats(void*)!"
  660. Rem
  661. bbdoc: Convert object to integer handle
  662. returns: An integer object handle
  663. about:
  664. After converting an object to an integer handle, you must later
  665. release it using the #Release command.
  666. End Rem
  667. Function HandleFromObject:Size_T( obj:Object )="bbHandleFromObject"
  668. Rem
  669. bbdoc: Convert integer handle to object
  670. returns: The object associated with the integer handle
  671. End Rem
  672. Function HandleToObject:Object( handle:Size_T )="bbHandleToObject"
  673. Rem
  674. bbdoc: Copies an array from the specified @src array, starting at the position @srcPos, to the position @dstPos of the destination array.
  675. End Rem
  676. Function ArrayCopy(src:Object, srcPos:Int, dst:Object, dstPos:Int, length:Int)="void bbArrayCopy(BBARRAY, int, BBARRAY, int, int)!"
  677. Rem
  678. bbdoc: Determines whether the #Object @obj is an empty array.
  679. returns: #True if @obj is an empty array, or #False otherwise.
  680. End Rem
  681. Function IsEmptyArray:Int(obj:Object)="int bbObjectIsEmptyArray(BBOBJECT)!"
  682. Rem
  683. bbdoc: Determines whether the #Object @obj is an empty #String.
  684. returns: #True if @obj is an empty #String, or #False otherwise.
  685. End Rem
  686. Function IsEmptyString:Int(obj:Object)="int bbObjectIsEmptyString(BBOBJECT)!"
  687. Rem
  688. bbdoc: Determines whether the #Object @obj is a #String.
  689. returns: #True if @obj is a #String, or #False otherwise.
  690. End Rem
  691. Function ObjectIsString:Int(obj:Object)="int bbObjectIsString(BBOBJECT)!"
  692. Function DumpObjectCounts(buffer:Byte Ptr, size:Int, includeZeros:Int)="void bbObjectDumpInstanceCounts(char *, int, int)!"
  693. Global CountObjectInstances:Int="bbCountInstances"
  694. End Extern
  695. Rem
  696. bbdoc: Provides a mechanism for releasing resources.
  697. End Rem
  698. Interface IDisposable
  699. Rem
  700. bbdoc: Performs application-defined tasks associated with freeing, releasing, or resetting resources.
  701. End Rem
  702. Method Dispose()
  703. End Interface
  704. 'BlitzMax keyword definitions
  705. Rem
  706. bbdoc: Set strict mode
  707. about:
  708. See the <a href="../../../../doc/bmxlang/compatibility.html">BlitzMax Language Reference</a> for more information on Strict mode programming.
  709. keyword: "Strict"
  710. End Rem
  711. Rem
  712. bbdoc: Set SuperStrict mode
  713. keyword: "SuperStrict"
  714. End Rem
  715. Rem
  716. bbdoc: End program execution
  717. keyword: "End"
  718. End Rem
  719. Rem
  720. bbdoc: Begin a remark block
  721. keyword: "Rem"
  722. End Rem
  723. Rem
  724. bbdoc: End a remark block
  725. keyword: "EndRem"
  726. End Rem
  727. Rem
  728. bbdoc: Constant integer of value 1
  729. keyword: "True"
  730. End Rem
  731. Rem
  732. bbdoc: Constant integer of value 0
  733. keyword: "False"
  734. End Rem
  735. Rem
  736. bbdoc: Constant pi value: 3.1415926535897932384626433832795
  737. keyword: "Pi"
  738. End Rem
  739. Rem
  740. bbdoc: Get Null value (default value for types)
  741. keyword: "Null"
  742. End Rem
  743. Rem
  744. bbdoc: Unsigned 8 bit integer type
  745. keyword: "Byte"
  746. End Rem
  747. Rem
  748. bbdoc: Unsigned 16 bit integer type
  749. keyword: "Short"
  750. End Rem
  751. Rem
  752. bbdoc: Signed 32 bit integer type
  753. keyword: "Int"
  754. End Rem
  755. Rem
  756. bbdoc: Unsigned 32 bit integer type
  757. keyword: "UInt"
  758. End Rem
  759. Rem
  760. bbdoc: Signed 64 bit integer type
  761. keyword: "Long"
  762. End Rem
  763. Rem
  764. bbdoc: Unsigned 64 bit integer type
  765. keyword: "ULong"
  766. End Rem
  767. Rem
  768. bbdoc: Unsigned 32/64 bit integer type
  769. keyword: "Size_T"
  770. End Rem
  771. Rem
  772. bbdoc: Signed 32/64 bit LPARAM WinAPI type
  773. keyword: "LParam"
  774. about: Only available on Windows.
  775. End Rem
  776. Rem
  777. bbdoc: Unsigned 32/64 bit WPARAM WinAPI type
  778. keyword: "WParam"
  779. about: Only available on Windows.
  780. End Rem
  781. Rem
  782. bbdoc: 32 bit floating point type
  783. keyword: "Float"
  784. End Rem
  785. Rem
  786. bbdoc: 64 bit floating point type
  787. keyword: "Double"
  788. End Rem
  789. Rem
  790. bbdoc: 128 bit integer intrinsic type
  791. about: Only available on x64.
  792. keyword: "Int128"
  793. End Rem
  794. Rem
  795. bbdoc: 64 bit floating point intrinsic type
  796. about: Only available on x64.
  797. keyword: "Float64"
  798. End Rem
  799. Rem
  800. bbdoc: 128 bit floating point intrinsic type
  801. about: Only available on x64.
  802. keyword: "Float128"
  803. End Rem
  804. Rem
  805. bbdoc: 128 bit floating point intrinsic type
  806. about: Only available on x64.
  807. keyword: "Double128"
  808. End Rem
  809. Rem
  810. bbdoc: Signed 32/64 bit integer type depending on platform
  811. keyword: "LongInt"
  812. EndRem
  813. Rem
  814. bbdoc: Unsigned 32/64 bit integer type depending on platform
  815. keyword: "ULongInt"
  816. EndRem
  817. Rem
  818. bbdoc: String type
  819. keyword: "String"
  820. End Rem
  821. Rem
  822. bbdoc: Object type
  823. keyword: "Object"
  824. End Rem
  825. Rem
  826. bbdoc: Composite type specifier for 'by reference' types
  827. keyword: "Var"
  828. End Rem
  829. Rem
  830. bbdoc: Composite type specifier for pointer types
  831. keyword: "Ptr"
  832. End Rem
  833. Rem
  834. bbdoc: Begin a conditional block.
  835. keyword: "If"
  836. End Rem
  837. Rem
  838. bbdoc: Optional separator between the condition and associated code in an If statement.
  839. keyword: "Then"
  840. End Rem
  841. Rem
  842. bbdoc: Else provides the ability for an If-Then construct to execute a second block of code when the If condition is false.
  843. keyword: "Else"
  844. End Rem
  845. Rem
  846. bbdoc: ElseIf provides the ability to test and execute a section of code if the initial condition failed.
  847. keyword: "ElseIf"
  848. End Rem
  849. Rem
  850. bbdoc: Marks the End of an If-Then construct.
  851. keyword: "EndIf"
  852. End Rem
  853. Rem
  854. bbdoc: Marks the start of a loop that uses an iterator to execute a section of code repeatedly.
  855. keyword: "For"
  856. End Rem
  857. Rem
  858. bbdoc: Followed by a constant which is used to calculate when to exit a For..Next loop.
  859. keyword: "To"
  860. End Rem
  861. Rem
  862. bbdoc: Specifies an optional constant that is used to increment the For iterator.
  863. keyword: "Step"
  864. End Rem
  865. Rem
  866. bbdoc: End a For block
  867. keyword: "Next"
  868. End Rem
  869. Rem
  870. bbdoc: Iterate through an array or collection
  871. keyword: "EachIn"
  872. End Rem
  873. Rem
  874. bbdoc: Execute a block of code while a condition is true
  875. keyword: "While"
  876. End Rem
  877. Rem
  878. bbdoc: End a While block
  879. keyword: "Wend"
  880. End Rem
  881. Rem
  882. bbdoc: End a While block
  883. keyword: "EndWhile"
  884. End Rem
  885. Rem
  886. bbdoc: Execute a block of code until a termination condition is met, or forever
  887. keyword: "Repeat"
  888. End Rem
  889. Rem
  890. bbdoc: Conditionally continue a Repeat block
  891. keyword: "Until"
  892. End Rem
  893. Rem
  894. bbdoc: Continue a Repeat block forever
  895. keyword: "Forever"
  896. End Rem
  897. Rem
  898. bbdoc: Begin a Select block
  899. keyword: "Select"
  900. End Rem
  901. Rem
  902. bbdoc: End a Select block
  903. keyword: "EndSelect"
  904. End Rem
  905. Rem
  906. bbdoc: Conditional code inside a Select block
  907. keyword: "Case"
  908. End Rem
  909. Rem
  910. bbdoc: Default code inside a Select block
  911. keyword: "Default"
  912. End Rem
  913. Rem
  914. bbdoc: Exit enclosing loop
  915. keyword: "Exit"
  916. End Rem
  917. Rem
  918. bbdoc: Continue execution of enclosing loop
  919. keyword: "Continue"
  920. End Rem
  921. Rem
  922. bbdoc: Declare a constant
  923. keyword: "Const"
  924. End Rem
  925. Rem
  926. bbdoc: Declare a local variable
  927. keyword: "Local"
  928. End Rem
  929. Rem
  930. bbdoc: Declare a global variable
  931. keyword: "Global"
  932. End Rem
  933. Rem
  934. bbdoc: Declare a threaded global variable
  935. about: Each thread will have its own copy of the variable - any changes to the variable will be visible only within the thread the change was made.
  936. keyword: "ThreadedGlobal"
  937. End Rem
  938. Rem
  939. bbdoc: Declare a field variable
  940. keyword: "Field"
  941. End Rem
  942. Rem
  943. bbdoc: Begin a function declaration
  944. keyword: "Function"
  945. End Rem
  946. Rem
  947. bbdoc: End a function declaration
  948. keyword: "EndFunction"
  949. End Rem
  950. Rem
  951. bbdoc: Begin a method declaration
  952. keyword: "Method"
  953. End Rem
  954. Rem
  955. bbdoc: End a method declaration
  956. keyword: "EndMethod"
  957. End Rem
  958. Rem
  959. bbdoc: Return from a method or function
  960. keyword: "Return"
  961. End Rem
  962. Rem
  963. bbdoc: Begin a user defined class declaration
  964. keyword: "Type"
  965. End Rem
  966. Rem
  967. bbdoc: End a user defined class declaration
  968. keyword: "EndType"
  969. End Rem
  970. Rem
  971. bbdoc: Begin a user defined interface declaration
  972. keyword: "Interface"
  973. End Rem
  974. Rem
  975. bbdoc: End a user defined interface declaration
  976. keyword: "EndInterface"
  977. End Rem
  978. Rem
  979. bbdoc: Begin a user defined structure declaration
  980. keyword: "Struct"
  981. End Rem
  982. Rem
  983. bbdoc: End a user defined structure declaration
  984. keyword: "EndStruct"
  985. End Rem
  986. Rem
  987. bbdoc: Begin an enumeration declaration
  988. keyword: "Enum"
  989. End Rem
  990. Rem
  991. bbdoc: End an enumeration declaration
  992. keyword: "EndEnum"
  993. End Rem
  994. Rem
  995. bbdoc: Specify supertype(s) of a user defined type
  996. keyword: "Extends"
  997. End Rem
  998. Rem
  999. bbdoc: Specify implemented interface(s) of a user defined type
  1000. keyword: "Implements"
  1001. End Rem
  1002. Rem
  1003. bbdoc: Denote a class, function or method as abstract
  1004. keyword: "Abstract"
  1005. End Rem
  1006. Rem
  1007. bbdoc: Denote a class, function or method as final
  1008. keyword: "Final"
  1009. End Rem
  1010. Rem
  1011. bbdoc: Denote a field as read only, where the value may only be set in its declaration or in the type constructor
  1012. keyword: "ReadOnly"
  1013. End Rem
  1014. Rem
  1015. bbdoc: Denote a function for export to a shared library. The generated function name will not be mangled.
  1016. keyword: "Export"
  1017. End Rem
  1018. Rem
  1019. bbdoc: Indicates that a method declaration is intended to override a method declaration in a supertype.
  1020. about: Use of #Override on a method that does not override a method will result in a compilation error.
  1021. keyword: "Override"
  1022. End Rem
  1023. Rem
  1024. bbdoc: Specify constraints on the types that can be used as arguments for a type parameter defined in a generic declaration
  1025. keyword: "Where"
  1026. End Rem
  1027. Rem
  1028. bbdoc: Create an instance of a user defined type, or specify a custom constructor
  1029. keyword: "New"
  1030. End Rem
  1031. Rem
  1032. bbdoc: Specify a custom finalizer
  1033. keyword: "Delete"
  1034. End Rem
  1035. Rem
  1036. bbdoc: Reference to this method's type instance
  1037. keyword: "Self"
  1038. End Rem
  1039. Rem
  1040. bbdoc: Reference to the super type instance
  1041. keyword: "Super"
  1042. End Rem
  1043. Rem
  1044. bbdoc: Release an integer object handle
  1045. keyword: "Release"
  1046. End Rem
  1047. Rem
  1048. bbdoc: Make types, constants, global variables, functions or type members accessible from outside the current source file (default)
  1049. keyword: "Public"
  1050. End Rem
  1051. Rem
  1052. bbdoc: Make types, constants, global variables, functions or type members only accessible from within the current source file.
  1053. keyword: "Private"
  1054. End Rem
  1055. Rem
  1056. bbdoc: Make type members only accessible from within the current source file and within subtypes.
  1057. keyword: "Protected"
  1058. End Rem
  1059. Rem
  1060. bbdoc: Begin an Extern section (a list of imported external declarations)
  1061. keyword: "Extern"
  1062. End Rem
  1063. Rem
  1064. bbdoc: End an Extern section
  1065. keyword: "EndExtern"
  1066. End Rem
  1067. Rem
  1068. bbdoc: Declare module scope and identifier
  1069. about:
  1070. See the <a href="../../../../doc/bmxlang/modules.html">BlitzMax Language Reference</a> for more information on BlitzMax Modules.
  1071. keyword: "Module"
  1072. End Rem
  1073. Rem
  1074. bbdoc: Define module properties
  1075. keyword: "ModuleInfo"
  1076. End Rem
  1077. Rem
  1078. bbdoc: Embed a data file
  1079. keyword: "Incbin"
  1080. End Rem
  1081. Rem
  1082. bbdoc: Get start address of embedded data file
  1083. keyword: "IncbinPtr"
  1084. End Rem
  1085. Rem
  1086. bbdoc: Get length of embedded data file
  1087. keyword: "IncbinLen"
  1088. End Rem
  1089. Rem
  1090. bbdoc: Include effectively 'inserts' the specified file into the file being compiled.
  1091. keyword: "Include"
  1092. End Rem
  1093. Rem
  1094. bbdoc: Framework builds the BlitzMax application with only the module(s) specified rather than the standard set of modules.
  1095. keyword: "Framework"
  1096. End Rem
  1097. Rem
  1098. bbdoc: Import declarations from a module or source file
  1099. keyword: "Import"
  1100. End Rem
  1101. Rem
  1102. bbdoc: Throw a RuntimeError if a condition is false
  1103. keyword: "Assert"
  1104. End Rem
  1105. Rem
  1106. bbdoc: Transfer program flow to specified label
  1107. keyword: "Goto"
  1108. End Rem
  1109. Rem
  1110. bbdoc: Begin declaration of a Try block
  1111. keyword: "Try"
  1112. End Rem
  1113. Rem
  1114. bbdoc: Catch an exception object in a Try block
  1115. keyword: "Catch"
  1116. End Rem
  1117. Rem
  1118. bbdoc: Execute a block of code upon exiting a Try or Catch block
  1119. keyword: "Finally"
  1120. End Rem
  1121. Rem
  1122. bbdoc: End declaration of a Try block
  1123. keyword: "EndTry"
  1124. End Rem
  1125. Rem
  1126. bbdoc: Throw an exception object to the enclosing Try block
  1127. keyword: "Throw"
  1128. End Rem
  1129. Rem
  1130. bbdoc: Define classic BASIC style data
  1131. keyword: "DefData"
  1132. End Rem
  1133. Rem
  1134. bbdoc: Read classic BASIC style data
  1135. keyword: "ReadData"
  1136. End Rem
  1137. Rem
  1138. bbdoc: Restore classic BASIC style data
  1139. keyword: "RestoreData"
  1140. End Rem
  1141. Rem
  1142. bbdoc: Conditional 'And' binary operator
  1143. keyword: "And"
  1144. End Rem
  1145. Rem
  1146. bbdoc: Conditional 'Or' binary operator
  1147. keyword: "Or"
  1148. End Rem
  1149. Rem
  1150. bbdoc: Conditional 'Not' binary operator
  1151. keyword: "Not"
  1152. End Rem
  1153. Rem
  1154. bbdoc: Bitwise 'Shift left' binary operator
  1155. keyword: "Shl"
  1156. End Rem
  1157. Rem
  1158. bbdoc: Bitwise 'Shift right' binary operator
  1159. keyword: "Shr"
  1160. End Rem
  1161. Rem
  1162. bbdoc: Bitwise 'Shift arithmetic right' binary operator
  1163. keyword: "Sar"
  1164. End Rem
  1165. Rem
  1166. bbdoc: Number of characters in a string or elements in an array
  1167. keyword: "Len"
  1168. End Rem
  1169. Rem
  1170. bbdoc: Numeric 'modulus' or 'remainder' binary operator
  1171. keyword: "Mod"
  1172. End Rem
  1173. Rem
  1174. bbdoc: Find the address of a variable
  1175. keyword: "Varptr"
  1176. End Rem
  1177. Rem
  1178. bbdoc: Size, in bytes, occupied by a variable, string, array or object
  1179. keyword: "SizeOf"
  1180. End Rem
  1181. Rem
  1182. bbdoc: Get character value of the first character of a string
  1183. keyword: "Asc"
  1184. End Rem
  1185. Rem
  1186. bbdoc: Create a string of length 1 with a character code
  1187. keyword: "Chr"
  1188. End Rem
  1189. Rem
  1190. bbdoc: Allocates memory from the stack.
  1191. keyword: "StackAlloc"
  1192. about: This memory is automatically freed on leaving the function where it was created.
  1193. It should not be freed, or returned from the function.
  1194. End Rem
  1195. Rem
  1196. bbdoc: Returns the offset in bytes for a field of the specified #Type or #Struct.
  1197. keyword: "FieldOffset"
  1198. End Rem
  1199. Rem
  1200. bbdoc: Denotes an array as a static array, with its content allocated on the stack.
  1201. keyword: "StaticArray"
  1202. End Rem