a1200   NEWS   APPS   DOCS   ABOUT
a1200
----
a1200
----
Autodocs
 Static lib:
 amiga.lib
  ACrypt
  AddTOF
  ArgArrayDone
  ArgArrayInit
  ArgInt
  ArgString
  BeginIO
  CallHook
  CallHookA
  CheckRexxMsg
  CoerceMethod
  CoerceMethodA
  CreateExtIO
  CreatePort
  CreateStdIO
  CreateTask
  CxCustom
  CxDebug
  CxFilter
  CxSender
  CxSignal
  CxTranslate
  DeleteExtIO
  DeletePort
  DeleteStdIO
  DeleteTask
  DoMethod
  DoMethodA
  DoSuperMethod
  DoSuperMethodA
  FastRand
  FreeIEvents
  GetRexxVar
  HookEntry
  HotKey
  InvertString
  LibAllocPooled
  LibCreatePool
  LibDeletePool
  LibFreePooled
  NewList
  RangeRand
  RemTOF
  SetRexxVar
  SetSuperAttrs
  TimeDelay
  afp
  arnd
  dbf
  fpa
  printf
  sprintf
  stdio
Include
GuruMeditation
Docs » Autodocs » amiga.lib » RangeRand

NAME

	RangeRand - generate a random number within a specific integer range

SYNOPSIS

	number = RangeRand(maxValue);
UWORD RangeRand(UWORD);

FUNCTION

	RangeRand() accepts a value from 0 to 65535, and returns a value
within that range.
maxValue is passed on stack as a 32-bit integer but used as though
it is only a 16-bit integer. Variable named RangeSeed is available
beginning with V33 that contains the global seed value passed from
call to call and thus can be changed in a program by declaring:
extern ULONG RangeSeed;

INPUTS

	maxValue - the returned random number will be in the range
[0..maxValue-1]

RESULT

	number - pseudo random number in the range of [0..maxValue-1].

SEE ALSO

FastRand()

Comments

Name:
E-mail: Use this if you want a message if you get a response, will not be shown.
Comment:
Select correct short for:

Horizon

CSL
HZ
AFL
RBS

Comments:

$VER: d0.se 1.14 Copyright © 2011-2024 Tobias Geijersson support at d0 dot se