Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- SuperLib 3.50 - function nozdiv() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FUNCTION NOZDIV()

  Short:
  ------
  NOZDIV() Prevents divide-by-zero

  Returns:
  --------
  <nNumber> => division result

  Syntax:
  -------
  NOZDIV(nNumber)

  Description:
  ------------
  Prevents divide-by-zero by converting a number to 1
  if it is zero, otherwise leaving it as-is.

  Not really needed in 5.01, but here for backward
  compatibility.

  Examples:
  ---------
   x = 5
   y = 0

   z = x/NOZDIV(y)

  Source:
  -------
  S_NOZDIV.PRG


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson