home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Basic / wst!blz1.dms / in.adf / docs / ElmoreLibs.doc < prev    next >
Encoding:
Text File  |  1994-09-05  |  26.3 KB  |  956 lines

  1. Library Name:
  2.   elmoreinclib      #111  ;see other doc
  3.   elmoredoslib      #109
  4.   elmoresyslib      #107
  5.   elmoremathlib     #105
  6.   elmorehardwarelib #103
  7.   elmorefuncslib    #101
  8.  
  9. Author:
  10.   Richard T Elmore, HeadSoft, 126 STATE ST. #20, SPEARFISH, SD 57783, USA
  11.  
  12. OverView:
  13.   These are the same libraries as included in BUM6, there are a lot
  14.   of people happily using elmore's libraries, I hope they all send
  15.   him a letter to the above adress.
  16.  
  17. Commands:
  18.  
  19.   Later Dude...
  20.  
  21. Authors Documentation:
  22.  
  23. (For the uninitiated:)
  24.  
  25.  
  26. NOTE ON FUNCTIONS, STATEMENTS and COMMANDS:
  27. -------------------------------------------
  28.  
  29. "FUNCTIONS" are Blitz2 tokens that require parameters in
  30. parentheses, and return a value:
  31. n=ABS(m)
  32.  
  33. "STATEMENTS" are Blitz2 tokens that only perform an action
  34. but do not return a value.  Their arguments do not require
  35. parentheses:
  36. PRINT "HELLO!"
  37.  
  38. "COMMANDS" are Blitz2 tokens that can be used as either a
  39. FUNCTION or a STATEMENT, depending upon whether the arguments
  40. were in parentheses or not.
  41.  
  42. [Function form:]
  43. n=REQUEST("TITLE","SELECT YES OR NO","YES|NO")
  44.  
  45. [Statement form:]
  46. REQUEST "TITLE","SELECT OK TO CONTINUE","OK"
  47.  
  48. ------------------------------------------------------------------------------
  49.  
  50.  
  51.  
  52.  
  53. Command: CHDIR
  54. --------------
  55. Syntax: CHDIR "Path:"  -or-  IF CHDIR("Path:") Then...
  56.  
  57. This command will change the current working directory for ALL disk-
  58. related commands.  Used as a function, a value of TRUE will be returned
  59. if the directory change was successful, or FALSE if it was unsuccessful.
  60.  
  61.  
  62. Function: PATHLOCK
  63. ------------------
  64. Syntax: Lock.l=PATHLOCK
  65.  
  66. This function will return the BCPL pointer to the lock of the current
  67. directory.  You should NEVER "Unlock_" this lock, but it is useful to
  68. use command "NameFromLock_" with it to determine the full pathname of
  69. the current directory, for example.  (NOTE: NameFromLock_ requires 2.0
  70. and above!)
  71.  
  72.  
  73. Command: COPYFILE
  74. -----------------
  75. Syntax: COPYFILE "First","SECOND"  -or-  IF COPYFILE("FIRST","SECOND") Then...
  76.  
  77. This command will copy files, much like the CLI command "Copy."  In the
  78. function form, it will return TRUE for success, and FALSE for failure.
  79. Note that the speed at which it copies can be increased by increasing the
  80. "CopyBuffer," which defaults to 8192 bytes.  (See below)
  81.  
  82.  
  83. Statement: SetCopyBuffer
  84. ------------------------
  85. Syntax: SetCopyBuffer BUFFERSIZE
  86.  
  87. This statement is used to set the size of the COPYFILE command's memory
  88. buffer.  The default size is 8192 bytes, but this can be adjusted from
  89. 256 bytes to nearly all your free memory.  A larger buffer will normally
  90. increase the speed at which the COPYFILE command operates, but only up to
  91. the size of the largest file you're copying.  For example, if the largest
  92. file you need to copy is 25000 bytes, then it will be useless to set the
  93. COPYBUFFER above 25000.
  94.  
  95.  
  96. Command: NAMEFILE
  97. -----------------
  98. Syntax: NAMEFILE "Oldname","Newname"  -or-
  99.         IF NAMEFILE("Oldname","Newname") Then...
  100.  
  101. This command returns FALSE for failure, TRUE for success:
  102. The file "oldname" is renamed to "newname," if possible, and may be moved
  103. to other directories within the same volume.  It is not yet possible to
  104. use NAMEFILE to move a file from one volume to another, however.
  105.  
  106.  
  107. Command: MAKEDIR
  108. ----------------
  109. Syntax: NAMEFILE "Path:Dir"  -or-  If NAMEFILE("Path:Dir") Then...
  110.  
  111. This command will attempt to create a new directory with the given pathname.
  112. It is only possible to create one level at a time, however.  For example,
  113. MAKEDIR will fail if you attempt to MAKEDIR "RAM:New/Data" if the directory
  114. "RAM:New" does not yet exist.  Used as a function, MAKEDIR returns TRUE for
  115. success, and FALSE for failure.
  116.  
  117.  
  118. Command: MOREENTRIES
  119. --------------------
  120. Syntax: MOREENTRIES  -or-  If MOREENTRIES Then...
  121.  
  122. This command will read the next entry in the current directory for
  123. inspection with other "ENTRY" commands.  Used within a loop, it is easy
  124. to read an entire directory with these commands, similar to the "DIR" or
  125. "LIST" commands of AmigaDOS.  (See below.  An example follows)
  126.  
  127.  
  128. Function: ENTRYNAME$
  129. --------------------
  130. Syntax: n$=ENTRYNAME$
  131.  
  132. This function returns the name of the current directory entry.  If used
  133. before the fist "MOREENTRIES" command, it will return the name of the
  134. current directory.  (Just the current directory's name, not the full
  135. path name)
  136.  
  137.  
  138. Function: ENTRYDIR
  139. ------------------
  140. Syntax: If ENTRYDIR Then...
  141.  
  142. This function returns TRUE if the current entry is a sub-directory, or
  143. FALSE if it is a file.
  144.  
  145.  
  146. Function: ENTRYBITS$
  147. --------------------
  148. Syntax: n$=ENTRYBITS$
  149.  
  150. This function returns a string containing the protection-bits status of
  151. the current file or directory.  An example may be "----RWED"  the same
  152. format as given by the AmigaDOS "LIST" command.  Possible bit settings
  153. are HSARWED:  H=HIDDEN, S=SCRIPT, A=ARCHIVED, R=READABLE, W=WRITEABLE,
  154. E=EXECUTEABLE, D=DELETEABLE.
  155. Any bits that are not set will have the "-" character in their place.
  156.  
  157.  
  158. Function: ENTRYSIZE
  159. -------------------
  160. Syntax: n.l=ENTRYSIZE
  161.  
  162. This function returns the size in bytes of the current directory entry.
  163. Note that sub-directories return a size of zero whether they are empty
  164. or not.
  165.  
  166.  
  167. Function: ENTRYDATE
  168. -------------------
  169. Syntax: d$=DATE$(ENTRYDATE)
  170.  
  171. This function returns the date the current entry was last modified, in
  172. the same format as SYSTEMDATE uses.  (The number of days since 1/1/1978)
  173. Thus, you may use the DATE$ and DATEFORMAT commands to translate it into
  174. a string with a more human-readable string.
  175.  
  176.  
  177. Function: ENTRYHOUR, ENTRYMINS, ENTRYSECS
  178. -------------------
  179. Syntax: h=ENTRYHOUR:m=ENTRYMINS:s=ENTRYSECS
  180.  
  181. ENTRYHOUR:
  182. This function is related to ENTRYDATE, above, but returns the hour of the
  183. day (0-23) at which the entry was last modified.
  184.  
  185. ENTRYMINS:
  186. Returns the minute (0-59) of the time at which the entry was modified.
  187.  
  188. ENTRYSECS:
  189. Returns the second (0-59) of the time at which the entry was modified.
  190.  
  191.  
  192.  
  193. Function: ENTRYCOMMENT$
  194. -----------------------
  195. Syntax: c$=ENTRYCOMMENT$
  196.  
  197. This function will return the string containing the filenote for the
  198. current directory entry, or "" if there is none.
  199.  
  200.  
  201.  
  202. *********************
  203. * DIRECTORY EXAMPLE *
  204. *********************
  205.  
  206. This example will list the entries in RAM: in a format very similar
  207. to the AmigaDOS "LIST" command.  Note that you need to "ChDir" to
  208. a directory in order to read it from the first entry again.
  209.  
  210.  
  211. ChDir "RAM:"
  212.  
  213. While MoreEntries
  214.   Print LSet$(EntryName$,30)
  215.   If EntryDIR then Print "Dir   " Else Print LSet$(Str$(EntrySize),6)
  216.   Print EntryBits$," ",Date$(EntryDate)," "
  217.   Print EntryHour,":",Right$("0"+Str$(EntryMins),2),":"
  218.   NPrint Right$("0"+Str$(EntrySecs),2)
  219. Wend
  220.  
  221. MouseWait
  222.  
  223.  
  224.  
  225.  
  226. Command: ANALYZEDISK
  227. --------------------
  228. Syntax: ANALYZEDISK "DRIVE:"  -or-  If ANALYZEDISK "DRIVE:" Then...
  229.  
  230. This command returns FALSE if the specified device or pathname was not
  231. valid.  If successful, details about the specified drive can be read with
  232. the following "DISK" functions.  The values for these functions will not
  233. change until ANALYZEDISK is executed again, either on the same drive or
  234. another one.
  235. Note:  If given a full pathname, such as "DF0:System/Utilities" this
  236. command will still know enough to analyze the disk "DF0:"
  237.  
  238.  
  239. Function: DISKUNIT
  240. ------------------
  241. Syntax: n=DISKUNIT
  242.  
  243. This function will return the unit number of the most recently analyzed
  244. disk.  DF0: for example, would return zero, while DF1: would return 1.
  245.  
  246.  
  247. Function: DISKERRS
  248. ------------------
  249. Syntax: n=DISKERRS
  250.  
  251. This function will return the number of soft errors DOS knows about on
  252. the last analyzed disk.  This should normally be zero.
  253.  
  254.  
  255.  
  256. Function: DISKCAPACITY
  257. ----------------------
  258. Syntax: n=DISKCAPACITY
  259.  
  260. This function returns the capacity in bytes of the last analyzed drive.
  261. For example, a fastfilesystem-formatted disk's max capacity is 837K, so
  262. DISKCAPACITY would return 857904, which divided by 1024 is 837.
  263.  
  264.  
  265.  
  266. Function: DISKUSED
  267. ------------------
  268. Syntax: n=DISKUSED
  269.  
  270. This function returns the number of bytes actually in-use on the last
  271. analyzed drive.
  272.  
  273.  
  274.  
  275. Function: DISKFREE
  276. ------------------
  277. Syntax: n=DISKFREE
  278.  
  279. The opposite of DISKUSED, DISKFREE returns the number of bytes free
  280. on the disk.  This function would be very useful, for example, in a
  281. program that needed to save information to disk.  You would be able
  282. to first determine if the specified SAVE disk had sufficient space.
  283.  
  284.  
  285. Function: DISKBLOCKS
  286. --------------------
  287. Syntax: n=DISKBLOCKS
  288.  
  289. This function returns the number of bytes each block on a disk uses,
  290. making it possible to convert the byte-values of the above functions
  291. to number of blocks.
  292.  
  293.  
  294. OverView:
  295.   Not only has Aaron kindly fixed up passing of argumens in our
  296.   cliargslib but has also donated this library which similar to
  297.   the Reflective Images version allows access to information
  298.   from the programs workbench icon.
  299.  
  300. Commands:
  301.   GetIconInfo:  boolean.w=GetIconInfo(icon#,iconname$)
  302.   IconTool$:    tool$=IconTool$(icon#,toolname$)
  303.   IconSubTool$: boolean.w=IconSubTool$(toolname$,subtool$)
  304.   IconType:     type.w=IconType(icon#)
  305.   IconStack:    stackSize.l=IconStack(icon#)
  306.   IconDefTool$: deftool$.w=IconDefTool$(icon#)
  307.  
  308. Authors Documentation:
  309.  
  310.  
  311.  
  312.   Library names: FUNCTIONS.ElmoreLib
  313.                  HARDWARE.Elmorelib
  314.                  MATH.ElmoreLib
  315.                  SYS.ElmoreLib
  316.  
  317. Library Numbers: 101, 103, 105 and 107, respectively
  318.      Written by: Richard T. Elmore
  319.       Copyright: 1994 HeadSoft Software
  320.  
  321.  
  322.  
  323.  
  324. ******************************************************************************
  325. ***************************** HARDWARE PROGRAMMING ***************************
  326. ******************************************************************************
  327.  
  328.  
  329.  
  330.  
  331.  
  332. Statement: QUIET 
  333. ****************
  334.      Syntax: Quiet ChannelMask 
  335.       Modes: Amiga or Blitz
  336. Description: 
  337. This command will silence the sound channels specified by ChannelMask.
  338. See the description for "Envelope" for more information on channelmasks.
  339.  
  340.  
  341. Statement: FREQ
  342. ***************
  343.      Syntax: Freq Channelmask,period
  344.       Modes: Amiga or Blitz
  345. Description:
  346. This command allows you to change the period, or pitch, of the
  347. currently playing sound effect.  Note that the lower the period,
  348. the higher the frequency; Thus, a period of 100 would be very
  349. high-pitched, whereas a period of 30000 would be low-pitched.
  350.  
  351.  
  352.  
  353.  
  354. Function: TICKS 
  355. ***************
  356.      Syntax: n=Ticks
  357.       Modes: Amiga or Blitz
  358. Description: 
  359. This function returns the number of "ticks" since the Amiga was switched
  360. on, or since the last "RESETTIMER" command.  The unit of measurement is
  361. 1/60 of a second for NTSC machines, and 1/50 of a second for PAL machines.
  362.  See Also:
  363.  ResetTimer
  364.  
  365.  
  366.  
  367.  
  368. Statement: RESETTIMER 
  369. *********************
  370.      Syntax: ResetTimer  
  371.       Modes: Amiga or Blitz
  372. Description: 
  373. Resets the Amiga's hardware timer to zero "ticks."  Read the description
  374. for "TICKS" for more information.
  375.  
  376.  
  377. Function: JOYC 
  378. **************
  379.      Syntax: n=JoyC (Port)
  380.       Modes: Amiga or Blitz
  381. Description: 
  382. This function works similarly to the JoyB() function, however it allows
  383. you to read the second fire button on two-button joysticks.  It will
  384. return a 1 if the normal fire button is pressed, a 2 if the second button
  385. is pressed, or 3 if both buttons are pressed.  Otherwise, it will return
  386. a zero (no buttons pressed.)
  387.  
  388.  
  389.  
  390. Statement: VWAITPOS 
  391. *******************
  392.      Syntax: VWaitPos RasterLine
  393.       Modes: Amiga or Blitz
  394. Description:
  395. This command is similar to VWAIT, except it allows you to wait for
  396. any raster position, not just the top of the display.  This is useful
  397. for interesting graphics effects.
  398.  
  399.  
  400.  
  401. Function: CHECKAGA
  402. ******************
  403.      Syntax: n=CheckAGA
  404.       Modes: Amiga or Blitz
  405. Description: 
  406. Returns 'TRUE' for AGA machines, otherwise returns 'FALSE.'
  407. Using ExecVersion alone will not detect an AGA machine.  Kickstart version
  408. 39 can and does run on pre-AGA machines, such as the A3000, etc.  Therefore,
  409. this function is provided to allow you to accurately determine if the
  410. AGA chipset is present.
  411.  
  412.  
  413.  
  414.  
  415. Function: PEEKTO$ 
  416. *****************
  417.      Syntax: n$=PeekTo$ (Address,byte)
  418.       Modes: Amiga or Blitz
  419. Description: 
  420. PeekTo$() is similar to the Peek$() function, except you can specify
  421. what terminator byte to use.  With Peek$() the terminator will always
  422. be zero, but PeekTo$() will accept any byte value as a terminator.
  423.  
  424.  
  425.  
  426. Statement: FORCEPAL 
  427. *******************
  428.      Syntax: ForcePAL  
  429.       Modes: Amiga or Blitz
  430. Description: 
  431. This command switches the current screen from NTSC to PAL.
  432.  
  433.  
  434.  
  435. Statement: FORCENTSC 
  436. ********************
  437.      Syntax: ForceNTSC  
  438.       Modes: Amiga or Blitz
  439. Description: 
  440. This command switches the current screen from PAL to NTSC.
  441.  
  442.  
  443.  
  444. Function: DEPTH 
  445. ***************
  446.      Syntax: n=Depth (Bitmap#)
  447.       Modes: Amiga or Blitz
  448. Description: 
  449. This function returns the depth of the specified Blitz2 bitmap object.
  450.  
  451.  
  452.  
  453. Statement: CLICKMOUSE 
  454. *********************
  455.      Syntax: ClickMouse  
  456.       Modes: Amiga or Blitz
  457. Description: 
  458. Similar to Mousewait, this command halts program execution until
  459. the user clicks the mouse.  There must must be a separate mouseclick
  460. for each CLICKMOUSE command, unlike Mousewait, which will continue
  461. through without pausing if the left mouse button was already being
  462. pressed.    NOTE:  Avoid using this command in Amiga mode, as it
  463. seriously degrades multitasking.
  464.  
  465.  
  466.  
  467. Function: CHIPFREE
  468. ******************
  469.      Syntax: n=ChipFree
  470.       Modes: Amiga or Blitz
  471. Description: 
  472. This function will return the size, in bytes, of the largest block
  473. of free CHIP memory in your system.
  474.  See Also:
  475.  FastFree
  476.  LargestFree
  477.  
  478.  
  479.  
  480. Function: FASTFREE 
  481. ******************
  482.      Syntax: n=FastFree
  483.       Modes: Amiga or Blitz
  484. Description: 
  485. This function returns the size of the largest block of FAST memory.
  486.  
  487.  
  488.  
  489. Function: LARGESTFREE 
  490. *********************
  491.      Syntax: n=LargestFree
  492.       Modes: Amiga or Blitz
  493. Description: 
  494. This function will return the size of the largest chunk of memory
  495. available.  This memory may be FAST or CHIP, depending on your system.
  496.  
  497.  
  498.  
  499.  
  500.  
  501. ******************************************************************************
  502. ***************************** MATH/NUMERIC FUNCTIONS *************************
  503. ******************************************************************************
  504.  
  505.  
  506.  
  507. Function: XOR
  508. *************
  509.      Syntax: n=Xor (expression,expression)
  510.       Modes: Amiga or Blitz
  511. Description: 
  512. Returns Exclusive OR of two expressions
  513. This function returns the "exclusive-OR" or the two supplied arguments.
  514. For example, Xor(255,170) will return 85, and Xor(-1) will return 0.
  515.  
  516.  
  517.  
  518. Function: LARGEST.L 
  519. *******************
  520.      Syntax: n=Largest.l (Long Integer1,Long Integer2)
  521.       Modes: Amiga or Blitz
  522. Description:
  523. This function will return the larger of the two supplied long integers.
  524. For example, Largest.l(255,20045) would return 20045.
  525.  
  526.  
  527. Function: SMALLEST.L 
  528. ********************
  529.      Syntax: n=Smallest.l (Long Integer1,Long Integer2)
  530.       Modes: Amiga or Blitz
  531. Description:
  532. This function will return the smaller of two supplied long integers.
  533. For example, Smallest.l(-999,5) would return -999.
  534.  
  535.  
  536. Function: LARGEST.Q 
  537. *******************
  538.      Syntax: n=Largest.q (Quick1,Quick2)
  539.       Modes: Amiga or Blitz
  540. Description:
  541. Identical to the function "Largest.l" (above) except that it accepts
  542. quick-type variables or expressions.
  543.  
  544.  
  545. Function: SMALLEST.Q 
  546. ********************
  547.      Syntax: n=Smallest.q (Quick1,Quick2)
  548.       Modes: Amiga or Blitz
  549. Description:
  550. Identical to "Smallest.q" but uses quick-types.
  551.  
  552.  
  553. Function: LARGEST 
  554. *****************
  555.      Syntax: n=Largest (Integer1,Integer2)
  556.       Modes: Amiga or Blitz
  557. Description:
  558. This is the fastest "Largest()" function.  Note that if passed floats
  559. or quick-types, the fraction will be cut off.  See description for
  560. Largest.l() and Largest.q().
  561.  
  562.  
  563. Function: SMALLEST 
  564. ******************
  565.      Syntax: n=Smallest (Integer1,Integer2)
  566.       Modes: Amiga or Blitz
  567. Description:
  568. Like Smallest.l() and Smallest.q(), above, with less accuracy, but
  569. faster than the long-integer and quick-type versions.
  570.  
  571.  
  572.  
  573. Function: AVG.L 
  574. ***************
  575.      Syntax: n=Avg.l (Long Integer 1,Long Integer 2)
  576.       Modes: Amiga or Blitz
  577. Description:
  578. This function will return the average of two long-integers (although
  579. the fraction is cut off.)  Thus, Avg.l(5,15)=10, and Avg.l(1,2)=1.
  580. (Since fractions will be cut off with this function, you may wish to
  581. use the quick-type version of this function for more accuracy.)
  582.  
  583.  
  584. Function: AVG.Q 
  585. ***************
  586.      Syntax: n=Avg.q (Quick1,Quick2)
  587.       Modes: Amiga or Blitz
  588. Description:
  589. See the description for "Avg.l()" (above)
  590.  
  591.  
  592. Function: AVG 
  593. *************
  594.      Syntax: n=Avg (Integer1,Integer2)
  595.       Modes: Amiga or Blitz
  596. Description:
  597. See the description for "Avg.l()" (above)
  598. This version is the fastest Avg() function available.
  599.  
  600.  
  601.  
  602. Statement: RRANDOMIZE 
  603. *********************
  604.      Syntax: RRandomize Seed
  605.       Modes: Amiga or Blitz
  606. Description:
  607. Given a float-type expression or variable, RRandomize will "seed" the
  608. reproducible random number generator.  The sequence of pseudo-random
  609. numbers produced by "RRND" will be the same for each seed given it.
  610. If you require trully random numbers, try "RRandomize Ticks."
  611.  
  612.  
  613. Function: RRND 
  614. **************
  615.      Syntax: n=RRnd (Low,High)
  616.       Modes: Amiga or Blitz
  617. Description:
  618. Given a range such as (1,6) this function will return a random number
  619. based on the seed given it by "RRandomize."  These sets of "random"
  620. numbers can be repeated if you provide the same seed.  This can be
  621. useful in games, etc. so that using "RRandomize Level#" and then using
  622. the RRnd() function to randomly draw the screen, each time the player
  623. returns to that particular level, it will be the same.
  624.  
  625.  
  626.  
  627. *****************************************************************************
  628. ********************************* ARRAY FUNCTIONS ****************************
  629. *****************************************************************************
  630.  
  631.  
  632.  
  633. Function: INDEX
  634. ***************
  635.      Syntax: n=Index List()
  636.       Modes: Amiga or Blitz
  637. Description: 
  638. Returns index from top of LIST
  639. This function will return the current index number of the supplied
  640. List() array passed to it.  For example, if the list pointer is currently
  641. at item 10 in the list, Index would return 10.
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648. ******************************************************************************
  649. ***************************** INTUITION PROGRAMMING **************************
  650. ******************************************************************************
  651.  
  652.  
  653.  
  654.  
  655. Statement or Function: REQUEST 
  656. ******************************
  657.      Syntax: Request "Title","Text Line|Text Line","Gadget1|Gadget2..."
  658.              n=Request "Title","Text Line|Text Line","Gadget1|Gadget2..."
  659.  
  660.       Modes: Amiga
  661.  
  662. ***************************************************************************
  663. *  This command is 2.0-specific.  If you're still using 1.3, this command *
  664. *  will be unavailable to you.                                            *
  665. ***************************************************************************
  666.  
  667. Description:
  668. "Request" can be used as both a command or a function.  You may
  669. provide an optional title (or "" for default window title) a string
  670. of text (separated by pipes "|" for each line) and a string containing
  671. text for gadgets within the requester.  (Separate with "|" if you
  672. need more than one.)
  673. Used as a command, it merely displays the requester on the current
  674. screen and waits for the user to click a gadget.  As a function, it
  675. will also return a number corresponding to the gadget selected.
  676. The gadget on the right should be reserved for negative responses
  677. such as "CANCEL" or "NO" and will always return zero.  Other gadgets
  678. will return values in the order that they appear, beginning with
  679. 1 for the first gadget, 2 for the next, etc.
  680.  
  681.  
  682.  
  683. Function: ACTIVESCREEN 
  684. **********************
  685.      Syntax: n=ActiveScreen
  686.       Modes: Amiga
  687. Description: 
  688. This function returns ADDRESS of current Intuition screen.  This is
  689. useful with many Intuition library commands, or to find out information
  690. about the currently active screen.
  691.  
  692.  
  693.  
  694. Function: SCREENWIDTH 
  695. *********************
  696.      Syntax: n=ScreenWidth
  697.       Modes: Amiga
  698. Description: 
  699. This function returns the pixelwidth of the currently active screen.
  700.  
  701.  
  702. Function: SCREENHEIGHT 
  703. **********************
  704.      Syntax: n=ScreenHeight
  705.       Modes: Amiga
  706. Description: 
  707. This function returns the pixelheight of the active screen
  708.  
  709.  
  710. Function: ACTIVEWINDOW 
  711. **********************
  712.      Syntax: n=ActiveWindow
  713.       Modes: Amiga
  714. Description: 
  715. This function returns the address of the current window.
  716. This address is mainly used in conjunction with Intuition library
  717. commands.
  718.  
  719.  
  720.  
  721. Statement or Function: WAITFOR 
  722. ******************************
  723.      Syntax: WaitFor IDCMP Code
  724.              n=WaitFor (IDCMP Code)
  725.  
  726.       Modes: Amiga
  727. Description: 
  728. Similar to WaitEvent, WAITFOR puts the Amiga to "sleep" until a specified
  729. IDCMP code wakes it up.  For example, WaitFor $400 would wait until the
  730. user strikes a key, and WaitFor $8 would wait until the "close" gadget
  731. of the current window was clicked on.  These IDCMP codes are additive,
  732. so WaitFor $408 would wait until either the "close" gadget was selected,
  733. or a key was pressed.  Refer to the section on "windows" in the Blitz2
  734. Reference Manual for more information on IDCMP codes.
  735.  
  736.  
  737.  
  738. Statement: SHOWREQUESTERS 
  739. *************************
  740.      Syntax: ShowRequesters OPTION
  741.       Modes: Amiga or Blitz
  742. Description:
  743.  
  744. OPTIONS:  0=Cancel all requesters
  745.           1=Show requesters on Workbench Screen
  746.           2=Direct requesters to current window
  747.  
  748. This command allows you to force system requesters like "Please insert
  749. volume Foo in any drive" etc. to either be turned off, directed to the
  750. workbench, or directed to the current window.  When requesters are turned
  751. off, the system will behave as if the "CANCEL" gadget was selected for
  752. each requester that would otherwise have been displayed.  Be sure to
  753. re-activate requesters before exiting your program!
  754.  
  755.  
  756.  
  757. ******************************************************************************
  758. ********************************** STRING HANDLING ***************************
  759. ******************************************************************************
  760.  
  761.  
  762.  
  763.  
  764.  
  765. Function: CHECKSUM 
  766. ******************
  767.      Syntax: n=Checksum (String$)
  768.       Modes: Amiga or Blitz
  769. Description: 
  770. Given a string, Checksum() will return a unique 32-bit integer as
  771. a checksum, useful in situations such as serial transfers, etc. to
  772. ensure both parties have the same data.
  773.  
  774.  
  775.  
  776.  
  777.  
  778. Function: CHARCOUNT 
  779. *******************
  780.      Syntax: n=CharCount (String$,byte)
  781.       Modes: Amiga or Blitz
  782. Description: 
  783. This function will return the number of occurances of a given byte
  784. within a string.  For example, CharCount(text$,32) will count the
  785. number of spaces in text$.
  786.  
  787.  
  788.  
  789. Function: SEARCHBEGIN 
  790. *********************
  791.      Syntax: n=SearchBegin (String$,byte,# from Begin)
  792.       Modes: Amiga or Blitz
  793. Description: 
  794. Similar to Instr(), SearchBegin will search the given string
  795. for the specified byte.  For example, SearchBegin(a$,32,1)
  796. will return the character position of the first space in a$,
  797. while SearchBegin(a$,32,3) will return the position of the
  798. third space.  If the byte is not found in the string, SearchBegin
  799. will return a zero.
  800.  
  801.  
  802.  
  803. Function: SEARCHEND
  804. *******************
  805.      Syntax: n=SearchEnd (String$,byte,# from End)
  806.       Modes: Amiga or Blitz
  807. Description:
  808. Like SearchBegin() (above) except it searches from the end of
  809. the string to the front.  For example, SearchBegin(a$,asc("A"),2)
  810. will return the character position of the second-from-last letter
  811. "A" in the string 'a$.'
  812.  
  813.  
  814. Function: CIPHER$ 
  815. *****************
  816.      Syntax: n=Cipher$ (String$)
  817.       Modes: Amiga or Blitz
  818. Description: 
  819. The Cipher$() function will encrypt or decrypt a string passed to it.
  820. This is especially handy if you don't want users "zapping" your executeable
  821. or data files to read it's contents.  Note that Cipher$() can only
  822. decrypt strings previously created with Cipher$().
  823.  
  824.  
  825.  
  826. Function: NULL
  827. ******************
  828.      Syntax: n=Null (String$)
  829.       Modes: Amiga or Blitz
  830. Description: 
  831. Many Amiga shared libraries (like the DOS library) require addresses
  832. of null-terminated strings as arguments.  This function will return
  833. a long-integer address of a null-terminated string in memory for such
  834. commands.
  835.  
  836.  
  837.  
  838. Function: REPEATS 
  839. *****************
  840.      Syntax: n=Repeats (String$)
  841.       Modes: Amiga or Blitz
  842. Description: 
  843. This function will return the number of repeated bytes at the
  844. beginning of your string.  Thus, Repeats("...Test") would return 3,
  845. while Repeats("Example") would return 1.  If the string is null,
  846. Repeats() will return zero.
  847.  
  848.  
  849. Function: SPACE$
  850. ****************
  851.      Syntax: n$=SPACE$ (number of spaces)
  852.       Modes: Amiga or Blitz
  853. Description:
  854. This function is identical to the Space$ function in many other dialects
  855. of BASIC.  It will return a string containing the desired number of
  856. spaces, making it easier to align tables etc. to the screen or printer.
  857.  
  858.  
  859. Function: Hex#
  860. **************
  861.      Syntax: n=Hex#(HexString$)
  862.       Modes: Amiga or Blitz
  863. Description:
  864. This function accepts a hexadecimal value stored in a string and returns
  865. the decimal value.
  866.  
  867.  
  868.  
  869. Function: Bin#
  870. **************
  871.      Syntax: n=Bin#(BinString$)
  872.       Modes: Amiga or Blitz
  873. Description:
  874. This function accepts a binary value stored in a string and returns
  875. the decimal value.
  876.  
  877.  
  878.  
  879.  
  880.  
  881. ******************************************************************************
  882. ***************************** LIBRARY PROGRAMMING ****************************
  883. ******************************************************************************
  884.  
  885.  
  886. These functions will return the base address of their respective libraries,
  887. for advanced system programming.  Note that register A6 will also be
  888. loaded with this address, to make programming a bit easier for assembly
  889. routines.
  890.  
  891.  
  892.  
  893. Function: INTUITIONBASE 
  894. ***********************
  895.      Syntax: n=IntuitionBase
  896.       Modes: Amiga or Blitz
  897. Description: 
  898. Returns Intuition Library base
  899.  
  900.  
  901. Function: DOSBASE 
  902. *****************
  903.      Syntax: n=DosBase
  904.       Modes: Amiga or Blitz
  905. Description: 
  906. Returns DOS Library base
  907.  
  908.  
  909. Function: GRAPHICSBASE 
  910. **********************
  911.      Syntax: n=GraphicsBase
  912.       Modes: Amiga or Blitz
  913. Description: 
  914. Returns Graphics Library base
  915.  
  916.  
  917. Function: FFPBASE 
  918. *****************
  919.      Syntax: n=FFPBase
  920.       Modes: Amiga or Blitz
  921. Description: 
  922. Returns FFP Math Library base
  923.  
  924.  
  925. Function: DISKFONTBASE 
  926. **********************
  927.      Syntax: n=DiskFontBase
  928.       Modes: Amiga or Blitz
  929. Description: 
  930. Returns DiskFont Library base
  931.  
  932.  
  933. Function: COMMODITIESBASE 
  934. *************************
  935.      Syntax: n=CommoditiesBase
  936.       Modes: Amiga or Blitz
  937. Description: 
  938. Returns Commodities Library base
  939.  
  940.  
  941. Function: ICONBASE 
  942. ******************
  943.      Syntax: n=IconBase
  944.       Modes: Amiga or Blitz
  945. Description: 
  946. Returns Icon Library base
  947.  
  948.  
  949. Function: REXXSYSBASE 
  950. *********************
  951.      Syntax: n=RexxSysBase
  952.       Modes: Amiga or Blitz
  953. Description: 
  954. Returns RexxSys Library base
  955.  
  956.