RBool

From SCAR Divi Manual
Revision as of 11:20, 28 June 2011 by Freddy (talk | contribs) (Created page with "==Definition== <source lang="scar" lines="false"> function RBool: Boolean; </source> ===Source Code=== <source lang="scar"> function RBool: Boolean; begin Result := Boolean(Ra...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Definition

function RBool: Boolean;

Source Code

function RBool: Boolean;
begin
  Result := Boolean(Random(2));
end;

Availability

SCAR Divi 3.00 > Current

Description

Returns a random boolean value. An extended function with additional functionality is available as RBoolEx.

Example

var
  i: Integer;
begin
  for i := 1 to 5 do
    WriteLn(RBool);
end.

See Also