blitz.bmx 26 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118
  1. SuperStrict
  2. NoDebug
  3. Rem
  4. bbdoc: BASIC/BlitzMax runtime
  5. End Rem
  6. Module BRL.Blitz
  7. ModuleInfo "Version: 1.21"
  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.21"
  14. ModuleInfo "History: Update to bdwgc 7.7.0.d76816e"
  15. ModuleInfo "History: 1.20"
  16. ModuleInfo "History: Update to bdwgc 7.7.0."
  17. ModuleInfo "History: 1.19"
  18. ModuleInfo "History: Added interfaces."
  19. ModuleInfo "History: Added Interface and EndInterface keyword docs"
  20. ModuleInfo "History: 1.18"
  21. ModuleInfo "History: WriteStdout and WriteStderr now write UTF-8"
  22. ModuleInfo "History: 1.17 Release"
  23. ModuleInfo "History: Added kludges for Lion llvm"
  24. ModuleInfo "History: Removed Nan/Inf"
  25. ModuleInfo "History: 1.16 Release"
  26. ModuleInfo "History: String.Find now converts start index <0 to 0"
  27. ModuleInfo "History: 1.15 Release"
  28. ModuleInfo "History: Changed ReadStdin so it can handle any length input"
  29. ModuleInfo "History: 1.14 Release"
  30. ModuleInfo "History: Fixed leak in WriteStdout and WriteStderr"
  31. ModuleInfo "History: 1.13 Release"
  32. ModuleInfo "History: Added LibStartUp stub"
  33. ModuleInfo "History: 1.12 Release"
  34. ModuleInfo "History: Added GCSuspend and GCResume"
  35. ModuleInfo "History: 1.11 Release"
  36. ModuleInfo "History: Added experimental dll support"
  37. ModuleInfo "History: 1.10 Release"
  38. ModuleInfo "History: Added Nan and Inf keyword docs"
  39. ModuleInfo "History: 1.09 Release"
  40. ModuleInfo "History: BCC extern CString fix"
  41. ModuleInfo "History: 1.08 Release"
  42. ModuleInfo "History: Removed printf from 'Throw'"
  43. ModuleInfo "History: 1.07 Release"
  44. ModuleInfo "History: Added AppTitle$ global var"
  45. ModuleInfo "History: 1.06 Release"
  46. ModuleInfo "History: Restored ReadData"
  47. ModuleInfo "History: 1.05 Release"
  48. ModuleInfo "History: Lotsa little tidyups"
  49. ModuleInfo "History: 1.04 Release"
  50. ModuleInfo "History: Fixed C Compiler warnings"
  51. ?win32
  52. ModuleInfo "CC_OPTS: -DGC_THREADS -DPARALLEL_MARK -DATOMIC_UNCOLLECTABLE -DLARGE_CONFIG"
  53. ?osx
  54. ModuleInfo "CC_OPTS: -DGC_THREADS -DPARALLEL_MARK -DATOMIC_UNCOLLECTABLE -DLARGE_CONFIG"
  55. ?linuxx86
  56. ModuleInfo "CC_OPTS: -DGC_THREADS -DPARALLEL_MARK -DATOMIC_UNCOLLECTABLE -DLARGE_CONFIG"
  57. ?linuxx64
  58. ModuleInfo "CC_OPTS: -DGC_THREADS -DPARALLEL_MARK -DATOMIC_UNCOLLECTABLE -DLARGE_CONFIG"
  59. ?raspberrypi
  60. ModuleInfo "CC_OPTS: -DGC_THREADS -DPARALLEL_MARK -DATOMIC_UNCOLLECTABLE"
  61. ?android
  62. ModuleInfo "CC_OPTS: -DGC_THREADS -DATOMIC_UNCOLLECTABLE"
  63. ?emscripten
  64. ModuleInfo "CC_OPTS: -DATOMIC_UNCOLLECTABLE"
  65. ?ios
  66. ModuleInfo "CC_OPTS: -DGC_THREADS -DATOMIC_UNCOLLECTABLE"
  67. ?musl
  68. ModuleInfo "CC_OPTS: -DNO_GETCONTEXT"
  69. ?nx
  70. ModuleInfo "CC_OPTS: -DATOMIC_UNCOLLECTABLE -DNN_BUILD_TARGET_PLATFORM_NX"
  71. ?
  72. ?debug
  73. ModuleInfo "CC_OPTS: -DBMX_DEBUG"
  74. ?
  75. Import "blitz_app.c"
  76. Import "blitz_types.c"
  77. Import "blitz_cclib.c"
  78. Import "blitz_memory.c"
  79. Import "blitz_module.c"
  80. Import "blitz_object.c"
  81. Import "blitz_string.c"
  82. Import "blitz_array.c"
  83. Import "blitz_handle.c"
  84. Import "blitz_debug.c"
  85. Import "blitz_incbin.c"
  86. Import "blitz_thread.c"
  87. Import "blitz_ex.c"
  88. Import "blitz_gc.c"
  89. Import "blitz_unicode.c"
  90. '?Threaded
  91. 'Import "blitz_gc_ms.c"
  92. '?Not Threaded
  93. 'Import "blitz_gc_rc.c"
  94. '?
  95. '?Win32X86
  96. 'Import "blitz_ex.win32.x86.s"
  97. 'Import "blitz_gc.win32.x86.s"
  98. 'Import "blitz_ftoi.win32.x86.s"
  99. '?LinuxX86
  100. 'Import "blitz_ex.linux.x86.s"
  101. 'Import "blitz_gc.linux.x86.s"
  102. 'Import "blitz_ftoi.linux.x86.s"
  103. '?MacosX86
  104. 'Import "blitz_ex.macos.x86.s"
  105. 'Import "blitz_gc.macos.x86.s"
  106. 'Import "blitz_ftoi.macos.x86.s"
  107. '?MacosPPC
  108. 'Import "blitz_ex.macos.ppc.s"
  109. 'Import "blitz_gc.macos.ppc.s"
  110. '?
  111. Import "bdwgc/include/*.h"
  112. Import "bdwgc/libatomic_ops/src/*.h"
  113. Import "bdwgc/reclaim.c"
  114. Import "bdwgc/allchblk.c"
  115. Import "bdwgc/misc.c"
  116. Import "bdwgc/alloc.c"
  117. Import "bdwgc/mach_dep.c"
  118. Import "bdwgc/os_dep.c"
  119. Import "bdwgc/mark_rts.c"
  120. Import "bdwgc/headers.c"
  121. Import "bdwgc/mark.c"
  122. Import "bdwgc/obj_map.c"
  123. Import "bdwgc/blacklst.c"
  124. Import "bdwgc/finalize.c"
  125. Import "bdwgc/new_hblk.c"
  126. Import "bdwgc/dyn_load.c"
  127. Import "bdwgc/dbg_mlc.c"
  128. Import "bdwgc/malloc.c"
  129. Import "bdwgc/checksums.c"
  130. Import "bdwgc/pthread_start.c"
  131. Import "bdwgc/pthread_support.c"
  132. Import "bdwgc/pthread_stop_world.c"
  133. Import "bdwgc/darwin_stop_world.c"
  134. Import "bdwgc/typd_mlc.c"
  135. Import "bdwgc/ptr_chck.c"
  136. Import "bdwgc/mallocx.c"
  137. Import "bdwgc/gcj_mlc.c"
  138. Import "bdwgc/specific.c"
  139. Import "bdwgc/gc_dlopen.c"
  140. Import "bdwgc/backgraph.c"
  141. Import "bdwgc/win32_threads.c"
  142. Import "bdwgc/thread_local_alloc.c" 'bdwgc only? not gc6.7
  143. ?nx
  144. Import "blitz_nx.c"
  145. ?
  146. Import "tree/tree.c"
  147. Include "builtin.bmx"
  148. Extern
  149. Global OnDebugStop()="bbOnDebugStop"
  150. Global OnDebugLog( message$ )="bbOnDebugLog"
  151. End Extern
  152. Rem
  153. bbdoc: Exception
  154. about: Common base class of the built-in exceptions of the language.
  155. End Rem
  156. Type TBlitzException
  157. End Type
  158. Rem
  159. bbdoc: Null object exception
  160. about: Thrown when a field or method of a Null object is accessed. (only in debug mode)
  161. End Rem
  162. Type TNullObjectException Extends TBlitzException
  163. Method ToString$() Override
  164. Return "Attempt to access field or method of Null object"
  165. End Method
  166. End Type
  167. Rem
  168. bbdoc: Null method exception
  169. about: Thrown when an abstract method is called.
  170. End Rem
  171. Type TNullMethodException Extends TBlitzException
  172. Method ToString$() Override
  173. Return "Attempt to call abstract method"
  174. End Method
  175. End Type
  176. Rem
  177. bbdoc: Null function exception
  178. about: Thrown when an uninitialized function pointer is called.
  179. End Rem
  180. Type TNullFunctionException Extends TBlitzException
  181. Method ToString$() Override
  182. Return "Attempt to call uninitialized function pointer"
  183. End Method
  184. End Type
  185. Rem
  186. bbdoc: Null method exception
  187. 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)
  188. End Rem
  189. Type TArrayBoundsException Extends TBlitzException
  190. Method ToString$() Override
  191. Return "Attempt to index array element beyond array length"
  192. End Method
  193. End Type
  194. Rem
  195. bbdoc: Out of data exception
  196. about: Thrown when #ReadData is used but not enough data is left to read. (only in debug mode)
  197. End Rem
  198. Type TOutOfDataException Extends TBlitzException
  199. Method ToString$() Override
  200. Return "Attempt to read beyond end of data"
  201. End Method
  202. End Type
  203. Rem
  204. bbdoc: Runtime exception
  205. about: Thrown by #RuntimeError.
  206. End Rem
  207. Type TRuntimeException Extends TBlitzException
  208. Field error$
  209. Method ToString$() Override
  210. Return error
  211. End Method
  212. Function Create:TRuntimeException( error$ )
  213. Local t:TRuntimeException=New TRuntimeException
  214. t.error=error
  215. Return t
  216. End Function
  217. End Type
  218. Function NullObjectError()
  219. Throw New TNullObjectException
  220. End Function
  221. Function NullMethodError()
  222. Throw New TNullMethodException
  223. End Function
  224. Function NullFunctionError()
  225. Throw New TNullFunctionException
  226. End Function
  227. Function ArrayBoundsError()
  228. Throw New TArrayBoundsException
  229. End Function
  230. Function OutOfDataError()
  231. Throw New TOutOfDataException
  232. End Function
  233. Rem
  234. bbdoc: Generate a runtime error
  235. about: Throws a #TRuntimeException.
  236. End Rem
  237. Function RuntimeError( message$ )
  238. Throw TRuntimeException.Create( message )
  239. End Function
  240. Rem
  241. bbdoc: Stop program execution and enter debugger
  242. about: If there is no debugger present, this command is ignored.
  243. end rem
  244. Function DebugStop()
  245. OnDebugStop
  246. End Function
  247. Rem
  248. bbdoc: Write a string to debug log
  249. about: If there is no debugger present, this command is ignored.
  250. end rem
  251. Function DebugLog( message$ )
  252. OnDebugLog message
  253. End Function
  254. Extern
  255. Rem
  256. bbdoc: Application directory
  257. about: The #AppDir global variable contains the fully qualified directory of the currently
  258. executing application. An application's initial current directory is also set to #AppDir
  259. when an application starts.
  260. End Rem
  261. Global AppDir$="bbAppDir"
  262. Rem
  263. bbdoc: Application file name
  264. about: The #AppFile global variable contains the fully qualified file name of the currently
  265. executing application.
  266. End Rem
  267. Global AppFile$="bbAppFile"
  268. Rem
  269. bbdoc: Application title
  270. about: The #AppTitle global variable is used by various commands when a
  271. default application title is required - for example, when opening simple
  272. windows or requesters.<br>
  273. <br>
  274. Initially, #AppTitle is set to the value "BlitzMax Application". However, you may change
  275. #AppTitle at any time with a simple assignment.
  276. End Rem
  277. Global AppTitle$="bbAppTitle"
  278. Rem
  279. bbdoc: Arguments passed to the application at startup
  280. about: The #AppArgs global array contains the command line parameters sent to an application
  281. when it was started. The first element of #AppArgs always contains the name of the
  282. application. However, the format of the name may change depending on how the application
  283. was launched. Use #AppDir or #AppFile for consistent information about the applications name
  284. or directory.
  285. End Rem
  286. Global AppArgs$[]="bbAppArgs"
  287. Rem
  288. bbdoc: Directory from which application was launched
  289. about: The #LaunchDir global variable contains the current directory at the time the
  290. application was launched. This is mostly of use to command line tools which may need to
  291. access the 'shell' current directory as opposed to the application directory.
  292. End Rem
  293. Global LaunchDir$="bbLaunchDir"
  294. Rem
  295. bbdoc: Add a function to be called when the program ends
  296. about: #OnEnd allows you to specify a function to be called when the program ends. OnEnd functions are called
  297. in the reverse order to that in which they were added.
  298. end rem
  299. Function OnEnd( fun() )="bbOnEnd"
  300. Rem
  301. bbdoc: Read a string from stdin
  302. returns: A string read from stdin. The newline terminator, if any, is included in the returned string.
  303. end rem
  304. Function ReadStdin$()="bbReadStdin"
  305. Rem
  306. bbdoc: Write a string to stdout
  307. about: Writes @str to stdout and flushes stdout.
  308. end rem
  309. Function WriteStdout( str$ )="bbWriteStdout"
  310. Rem
  311. bbdoc: Write a string to stderr
  312. about: Writes @str to stderr and flushes stderr.
  313. end rem
  314. Function WriteStderr( str$ )="bbWriteStderr"
  315. Rem
  316. bbdoc: Wait for a given number of milliseconds
  317. about:
  318. #Delay suspends program execution for at least @millis milliseconds.<br>
  319. <br>
  320. A millisecond is one thousandth of a second.
  321. End Rem
  322. Function Delay( millis:Int )="bbDelay"
  323. Rem
  324. bbdoc: Get millisecond counter
  325. returns: Milliseconds since computer turned on.
  326. about:
  327. #MilliSecs returns the number of milliseconds elapsed since the computer
  328. was turned on.<br>
  329. <br>
  330. A millisecond is one thousandth of a second.
  331. End Rem
  332. Function MilliSecs:Int()="bbMilliSecs"
  333. Rem
  334. bbdoc: Allocate memory
  335. returns: A new block of memory @size bytes long
  336. End Rem
  337. Function MemAlloc:Byte Ptr( size:Size_T )="void* bbMemAlloc( size_t )"
  338. Rem
  339. bbdoc: Free allocated memory
  340. about: The memory specified by @mem must have been previously allocated by #MemAlloc or #MemExtend.
  341. End Rem
  342. Function MemFree( mem:Byte Ptr )="void bbMemFree( void * )"
  343. Rem
  344. bbdoc: Extend a block of memory
  345. returns: A new block of memory @new_size bytes long
  346. about: An existing block of memory specified by @mem and @size is copied into a new block
  347. of memory @new_size bytes long. The existing block is released and the new block is returned.
  348. End Rem
  349. Function MemExtend:Byte Ptr( mem:Byte Ptr,size:Size_T,new_size:Size_T )="void* bbMemExtend( void *,size_t ,size_t )"
  350. Rem
  351. bbdoc: Clear a block of memory to 0
  352. End Rem
  353. Function MemClear( mem:Byte Ptr,size:Size_T )="void bbMemClear( void *,size_t )"
  354. Rem
  355. bbdoc: Copy a non-overlapping block of memory
  356. End Rem
  357. Function MemCopy( dst:Byte Ptr,src:Byte Ptr,size:Size_T )="void bbMemCopy( void *,const void *,size_t )"
  358. Rem
  359. bbdoc: Copy a potentially overlapping block of memory
  360. End Rem
  361. Function MemMove( dst:Byte Ptr,src:Byte Ptr,size:Size_T )="void bbMemMove( void *,const void *,size_t )"
  362. Rem
  363. bbdoc: Set garbage collector mode
  364. about:
  365. @mode can be one of the following:<br>
  366. 1 : automatic GC - memory will be automatically garbage collected<br>
  367. 2 : manual GC - no memory will be collected until a call to GCCollect is made<br>
  368. <br>
  369. The default GC mode is automatic GC.
  370. End Rem
  371. Function GCSetMode( Mode:Int )="bbGCSetMode"
  372. Rem
  373. bbdoc: Suspend garbage collector
  374. about:
  375. #GCSuspend temporarily suspends the garbage collector. No garbage
  376. collection will be performed following a call to #GCSuspend.<br>
  377. <br>
  378. Use #GCResume to resume the garbage collector. Note that #GCSuspend
  379. and #GCResume 'nest', meaning that each call to #GCSuspend must be
  380. matched by a call to #GCResume.
  381. End Rem
  382. Function GCSuspend()="bbGCSuspend"
  383. Rem
  384. bbdoc: Resume garbage collector
  385. about:
  386. #GCResume resumes garbage collection following a call to #GCSuspend.<br>
  387. <br>
  388. See #GCSuspend for more details.
  389. End Rem
  390. Function GCResume()="bbGCResume"
  391. Rem
  392. bbdoc: Run garbage collector
  393. returns: The amount of memory, in bytes, collected.
  394. about:
  395. This function will have no effect if the garbage collector has been
  396. suspended due to #GCSuspend.
  397. End Rem
  398. Function GCCollect:Int()="bbGCCollect"
  399. Rem
  400. bbdoc: Run garbage collector, collecting a little
  401. returns: Returns 0 if there is no more to collect.
  402. about:
  403. This function will have no effect if the garbage collector has been
  404. suspended due to #GCSuspend.
  405. End Rem
  406. Function GCCollectALittle:Int()="bbGCCollectALittle"
  407. Rem
  408. bbdoc: Memory allocated by application
  409. returns: The amount of memory, in bytes, currently allocated by the application
  410. about:
  411. This function only returns 'managed memory'. This includes all objects, strings and
  412. arrays in use by the application.
  413. End Rem
  414. Function GCMemAlloced:Int()="bbGCMemAlloced"
  415. Rem
  416. bbdoc: Private: do not use
  417. End Rem
  418. Function GCEnter()="bbGCEnter"
  419. Rem
  420. bbdoc: Private: do not use
  421. End Rem
  422. Function GCLeave()="bbGCLeave"
  423. Rem
  424. bbdoc: Retains a reference to the specified #Object, preventing it from being collected.
  425. End Rem
  426. Function GCRetain(obj:Object)="bbGCRetain"
  427. Rem
  428. bbdoc: Releases a reference from the specified #Object.
  429. End Rem
  430. Function GCRelease(obj:Object)="bbGCRelease"
  431. Rem
  432. bbdoc: Returns #True if the current thread is registered with the garbage collector.
  433. End Rem
  434. Function GCThreadIsRegistered:Int()="bbGCThreadIsRegistered"
  435. Rem
  436. bbdoc: Registers the current thread with the garbage collector.
  437. returns: 0 on success, 1 if the thread was already registered, or -1 if threads are not supported.
  438. End Rem
  439. Function GCRegisterMyThread:Int()="bbGCRegisterMyThread"
  440. Rem
  441. bbdoc: Unregisters the previously registered current thread.
  442. about: Note, that any memory allocated by the garbage collector from the current thread will no longer be
  443. accessible after the thread is unregistered.
  444. End Rem
  445. Function GCUnregisterMyThread:Int()="bbGCUnregisterMyThread"
  446. Rem
  447. bbdoc: Convert object to integer handle
  448. returns: An integer object handle
  449. about:
  450. After converting an object to an integer handle, you must later
  451. release it using the #Release command.
  452. End Rem
  453. Function HandleFromObject:Size_T( obj:Object )="bbHandleFromObject"
  454. Rem
  455. bbdoc: Convert integer handle to object
  456. returns: The object associated with the integer handle
  457. End Rem
  458. Function HandleToObject:Object( handle:Size_T )="bbHandleToObject"
  459. Rem
  460. bbdoc: Copies an array from the specified @src array, starting at the position @srcPos, to the position @dstPos of the destination array.
  461. End Rem
  462. Function ArrayCopy(src:Object, srcPos:Int, dst:Object, dstPos:Int, length:Int)="void bbArrayCopy(BBARRAY, int, BBARRAY, int, int)!"
  463. End Extern
  464. Rem
  465. bbdoc: Provides a mechanism for releasing resources.
  466. End Rem
  467. Interface IDisposable
  468. Rem
  469. bbdoc: Performs application-defined tasks associated with freeing, releasing, or resetting resources.
  470. End Rem
  471. Method Dispose()
  472. End Interface
  473. 'BlitzMax keyword definitions
  474. Rem
  475. bbdoc: Set strict mode
  476. about:
  477. See the <a href=../../../../doc/bmxlang/compatibility.html>BlitzMax Language Reference</a> for more information on Strict mode programming.
  478. keyword: "Strict"
  479. End Rem
  480. Rem
  481. bbdoc: Set SuperStrict mode
  482. keyword: "SuperStrict"
  483. End Rem
  484. Rem
  485. bbdoc: End program execution
  486. keyword: "End"
  487. End Rem
  488. Rem
  489. bbdoc: Begin a remark block
  490. keyword: "Rem"
  491. End Rem
  492. Rem
  493. bbdoc: End a remark block
  494. keyword: "EndRem"
  495. End Rem
  496. Rem
  497. bbdoc: Constant integer of value 1
  498. keyword: "True"
  499. End Rem
  500. Rem
  501. bbdoc: Constant integer of value 0
  502. keyword: "False"
  503. End Rem
  504. Rem
  505. bbdoc: Constant pi value: 3.1415926535897932384626433832795
  506. keyword: "Pi"
  507. End Rem
  508. Rem
  509. bbdoc: Get Null value (default value for types)
  510. keyword: "Null"
  511. End Rem
  512. Rem
  513. bbdoc: Unsigned 8 bit integer type
  514. keyword: "Byte"
  515. End Rem
  516. Rem
  517. bbdoc: Unsigned 16 bit integer type
  518. keyword: "Short"
  519. End Rem
  520. Rem
  521. bbdoc: Signed 32 bit integer type
  522. keyword: "Int"
  523. End Rem
  524. Rem
  525. bbdoc: Unsigned 32 bit integer type
  526. keyword: "UInt"
  527. End Rem
  528. Rem
  529. bbdoc: Signed 64 bit integer type
  530. keyword: "Long"
  531. End Rem
  532. Rem
  533. bbdoc: Unsigned 64 bit integer type
  534. keyword: "ULong"
  535. End Rem
  536. Rem
  537. bbdoc: Unsigned 32/64 bit integer type
  538. keyword: "Size_T"
  539. End Rem
  540. Rem
  541. bbdoc: Signed 32/64 bit LPARAM WinAPI type
  542. keyword: "LParam"
  543. about: Only available on Windows.
  544. End Rem
  545. Rem
  546. bbdoc: Unsigned 32/64 bit WPARAM WinAPI type
  547. keyword: "WParam"
  548. about: Only available on Windows.
  549. End Rem
  550. Rem
  551. bbdoc: 32 bit floating point type
  552. keyword: "Float"
  553. End Rem
  554. Rem
  555. bbdoc: 64 bit floating point type
  556. keyword: "Double"
  557. End Rem
  558. Rem
  559. bbdoc: 128 bit integer intrinsic type
  560. about: Only available on x64.
  561. keyword: "Int128"
  562. End Rem
  563. Rem
  564. bbdoc: 64 bit floating point intrinsic type
  565. about: Only available on x64.
  566. keyword: "Float64"
  567. End Rem
  568. Rem
  569. bbdoc: 128 bit floating point intrinsic type
  570. about: Only available on x64.
  571. keyword: "Float128"
  572. End Rem
  573. Rem
  574. bbdoc: 128 bit floating point intrinsic type
  575. about: Only available on x64.
  576. keyword: "Double128"
  577. End Rem
  578. Rem
  579. bbdoc: String type
  580. keyword: "String"
  581. End Rem
  582. Rem
  583. bbdoc: Object type
  584. keyword: "Object"
  585. End Rem
  586. Rem
  587. bbdoc: Composite type specifier for 'by reference' types
  588. keyword: "Var"
  589. End Rem
  590. Rem
  591. bbdoc: Composite type specifier for pointer types
  592. keyword: "Ptr"
  593. End Rem
  594. Rem
  595. bbdoc: Begin a conditional block.
  596. keyword: "If"
  597. End Rem
  598. Rem
  599. bbdoc: Optional separator between the condition and associated code in an If statement.
  600. keyword: "Then"
  601. End Rem
  602. Rem
  603. bbdoc: Else provides the ability for an If-Then construct to execute a second block of code when the If condition is false.
  604. keyword: "Else"
  605. End Rem
  606. Rem
  607. bbdoc: ElseIf provides the ability to test and execute a section of code if the initial condition failed.
  608. keyword: "ElseIf"
  609. End Rem
  610. Rem
  611. bbdoc: Marks the End of an If-Then construct.
  612. keyword: "EndIf"
  613. End Rem
  614. Rem
  615. bbdoc: Marks the start of a loop that uses an iterator to execute a section of code repeatedly.
  616. keyword: "For"
  617. End Rem
  618. Rem
  619. bbdoc: Followed by a constant which is used to calculate when to exit a For..Next loop.
  620. keyword: "To"
  621. End Rem
  622. Rem
  623. bbdoc: Specifies an optional constant that is used to increment the For iterator.
  624. keyword: "Step"
  625. End Rem
  626. Rem
  627. bbdoc: End a For block
  628. keyword: "Next"
  629. End Rem
  630. Rem
  631. bbdoc: Iterate through an array or collection
  632. keyword: "EachIn"
  633. End Rem
  634. Rem
  635. bbdoc: Execute a block of code while a condition is true
  636. keyword: "While"
  637. End Rem
  638. Rem
  639. bbdoc: End a While block
  640. keyword: "Wend"
  641. End Rem
  642. Rem
  643. bbdoc: End a While block
  644. keyword: "EndWhile"
  645. End Rem
  646. Rem
  647. bbdoc: Execute a block of code until a termination condition is met, or forever
  648. keyword: "Repeat"
  649. End Rem
  650. Rem
  651. bbdoc: Conditionally continue a Repeat block
  652. keyword: "Until"
  653. End Rem
  654. Rem
  655. bbdoc: Continue a Repeat block forever
  656. keyword: "Forever"
  657. End Rem
  658. Rem
  659. bbdoc: Begin a Select block
  660. keyword: "Select"
  661. End Rem
  662. Rem
  663. bbdoc: End a Select block
  664. keyword: "EndSelect"
  665. End Rem
  666. Rem
  667. bbdoc: Conditional code inside a Select block
  668. keyword: "Case"
  669. End Rem
  670. Rem
  671. bbdoc: Default code inside a Select block
  672. keyword: "Default"
  673. End Rem
  674. Rem
  675. bbdoc: Exit enclosing loop
  676. keyword: "Exit"
  677. End Rem
  678. Rem
  679. bbdoc: Continue execution of enclosing loop
  680. keyword: "Continue"
  681. End Rem
  682. Rem
  683. bbdoc: Declare a constant
  684. keyword: "Const"
  685. End Rem
  686. Rem
  687. bbdoc: Declare a local variable
  688. keyword: "Local"
  689. End Rem
  690. Rem
  691. bbdoc: Declare a global variable
  692. keyword: "Global"
  693. End Rem
  694. Rem
  695. bbdoc: Declare a field variable
  696. keyword: "Field"
  697. End Rem
  698. Rem
  699. bbdoc: Begin a function declaration
  700. keyword: "Function"
  701. End Rem
  702. Rem
  703. bbdoc: End a function declaration
  704. keyword: "EndFunction"
  705. End Rem
  706. Rem
  707. bbdoc: Begin a method declaration
  708. keyword: "Method"
  709. End Rem
  710. Rem
  711. bbdoc: End a method declaration
  712. keyword: "EndMethod"
  713. End Rem
  714. Rem
  715. bbdoc: Return from a method or function
  716. keyword: "Return"
  717. End Rem
  718. Rem
  719. bbdoc: Begin a user defined class declaration
  720. keyword: "Type"
  721. End Rem
  722. Rem
  723. bbdoc: End a user defined class declaration
  724. keyword: "EndType"
  725. End Rem
  726. Rem
  727. bbdoc: Begin a user defined interface declaration
  728. keyword: "Interface"
  729. End Rem
  730. Rem
  731. bbdoc: End a user defined interface declaration
  732. keyword: "EndInterface"
  733. End Rem
  734. Rem
  735. bbdoc: Begin a user defined structure declaration
  736. keyword: "Struct"
  737. End Rem
  738. Rem
  739. bbdoc: End a user defined structure declaration
  740. keyword: "EndStruct"
  741. End Rem
  742. Rem
  743. bbdoc: Specify supertype(s) of a user defined type
  744. keyword: "Extends"
  745. End Rem
  746. Rem
  747. bbdoc: Specify implemented interface(s) of a user defined type
  748. keyword: "Implements"
  749. End Rem
  750. Rem
  751. bbdoc: Denote a class, function or method as abstract
  752. keyword: "Abstract"
  753. End Rem
  754. Rem
  755. bbdoc: Denote a class, function or method as final
  756. keyword: "Final"
  757. End Rem
  758. Rem
  759. bbdoc: Denote a field as read only, where the value may only be set in its declaration or in the type constructor
  760. keyword: "ReadOnly"
  761. End Rem
  762. Rem
  763. bbdoc: Denote a function for export to a shared library. The generated function name will not be mangled.
  764. keyword: "Export"
  765. End Rem
  766. Rem
  767. bbdoc: Indicates that a method declaration is intended to override a method declaration in a supertype.
  768. about: Use of #Override on a method that does not override a method will result in a compilation error.
  769. keyword: "Override"
  770. End Rem
  771. Rem
  772. bbdoc: Specify constraints on the types that can be used as arguments for a type parameter defined in a generic declaration
  773. keyword: "Where"
  774. End Rem
  775. Rem
  776. bbdoc: Create an instance of a user defined type, or specify a custom constructor
  777. keyword: "New"
  778. End Rem
  779. Rem
  780. bbdoc: Specify a custom finalizer
  781. keyword: "Delete"
  782. End Rem
  783. Rem
  784. bbdoc: Reference to this method's type instance
  785. keyword: "Self"
  786. End Rem
  787. Rem
  788. bbdoc: Reference to the super type instance
  789. keyword: "Super"
  790. End Rem
  791. Rem
  792. bbdoc: Release an integer object handle
  793. keyword: "Release"
  794. End Rem
  795. Rem
  796. bbdoc: Make types, constants, global variables, functions or type members accessible from outside the current source file (default)
  797. keyword: "Public"
  798. End Rem
  799. Rem
  800. bbdoc: Make types, constants, global variables, functions or type members only accessible from within the current source file.
  801. keyword: "Private"
  802. End Rem
  803. Rem
  804. bbdoc: Make type members only accessible from within the current source file and within subtypes.
  805. keyword: "Protected"
  806. End Rem
  807. Rem
  808. bbdoc: Begin an Extern section (a list of imported external declarations)
  809. keyword: "Extern"
  810. End Rem
  811. Rem
  812. bbdoc: End an Extern section
  813. keyword: "EndExtern"
  814. End Rem
  815. Rem
  816. bbdoc: Declare module scope and identifier
  817. about:
  818. See the <a href=../../../../doc/bmxlang/modules.html>BlitzMax Language Reference</a> for more information on BlitzMax Modules.
  819. keyword: "Module"
  820. End Rem
  821. Rem
  822. bbdoc: Define module properties
  823. keyword: "ModuleInfo"
  824. End Rem
  825. Rem
  826. bbdoc: Embed a data file
  827. keyword: "Incbin"
  828. End Rem
  829. Rem
  830. bbdoc: Get start address of embedded data file
  831. keyword: "IncbinPtr"
  832. End Rem
  833. Rem
  834. bbdoc: Get length of embedded data file
  835. keyword: "IncbinLen"
  836. End Rem
  837. Rem
  838. bbdoc: Include effectively 'inserts' the specified file into the file being compiled.
  839. keyword: "Include"
  840. End Rem
  841. Rem
  842. bbdoc: Framework builds the BlitzMax application with only the module(s) specified rather than the standard set of modules.
  843. keyword: "Framework"
  844. End Rem
  845. Rem
  846. bbdoc: Import declarations from a module or source file
  847. keyword: "Import"
  848. End Rem
  849. Rem
  850. bbdoc: Throw a RuntimeError if a condition is false
  851. keyword: "Assert"
  852. End Rem
  853. Rem
  854. bbdoc: Transfer program flow to specified label
  855. keyword: "Goto"
  856. End Rem
  857. Rem
  858. bbdoc: Begin declaration of a Try block
  859. keyword: "Try"
  860. End Rem
  861. Rem
  862. bbdoc: Catch an exception object in a Try block
  863. keyword: "Catch"
  864. End Rem
  865. Rem
  866. bbdoc: Execute a block of code upon exiting a Try or Catch block
  867. keyword: "Finally"
  868. End Rem
  869. Rem
  870. bbdoc: End declaration of a Try block
  871. keyword: "EndTry"
  872. End Rem
  873. Rem
  874. bbdoc: Throw an exception object to the enclosing Try block
  875. keyword: "Throw"
  876. End Rem
  877. Rem
  878. bbdoc: Define classic BASIC style data
  879. keyword: "DefData"
  880. End Rem
  881. Rem
  882. bbdoc: Read classic BASIC style data
  883. keyword: "ReadData"
  884. End Rem
  885. Rem
  886. bbdoc: Restore classic BASIC style data
  887. keyword: "RestoreData"
  888. End Rem
  889. Rem
  890. bbdoc: Conditional 'And' binary operator
  891. keyword: "And"
  892. End Rem
  893. Rem
  894. bbdoc: Conditional 'Or' binary operator
  895. keyword: "Or"
  896. End Rem
  897. Rem
  898. bbdoc: Conditional 'Not' binary operator
  899. keyword: "Not"
  900. End Rem
  901. Rem
  902. bbdoc: Bitwise 'Shift left' binary operator
  903. keyword: "Shl"
  904. End Rem
  905. Rem
  906. bbdoc: Bitwise 'Shift right' binary operator
  907. keyword: "Shr"
  908. End Rem
  909. Rem
  910. bbdoc: Bitwise 'Shift arithmetic right' binary operator
  911. keyword: "Sar"
  912. End Rem
  913. Rem
  914. bbdoc: Number of characters in a string or elements in an array
  915. keyword: "Len"
  916. End Rem
  917. Rem
  918. bbdoc: Numeric 'modulus' or 'remainder' binary operator
  919. keyword: "Mod"
  920. End Rem
  921. Rem
  922. bbdoc: Find the address of a variable
  923. keyword: "Varptr"
  924. End Rem
  925. Rem
  926. bbdoc: Size, in bytes, occupied by a variable, string, array or object
  927. keyword: "SizeOf"
  928. End Rem
  929. Rem
  930. bbdoc: Get character value of the first character of a string
  931. keyword: "Asc"
  932. End Rem
  933. Rem
  934. bbdoc: Create a string of length 1 with a character code
  935. keyword: "Chr"
  936. End Rem