home > 比較編 > Delphi, PL/SQL, T-SQL, Ada > arithmetic and logic >

ForNext

Only Do What Only You Can Do

036. random integer, random float

VBScript

JScript

Perl

PHP

Python

Ruby

PowerShell

Scala

F#

C

C++

C++Builder

VC++

C#

Java

Objective-C

D

VB

VB.NET

Delphi

Pascal

random(100)
random









Ada

with Ada.Numerics.Float_Random;
with Ada.Numerics.Discrete_Random;
use Ada.Numerics;
procedure Foo is
  type Rand_Range is range 0..99;
  package Rand_Int is new Discrete_Random(Rand_Range);
  IG : Rand_Int.Generator;
  FG : Float_Random.Generator;
begin
   use Rand_Int.Random(IG)
   use Float_Random.Random(FG)

PL/SQL

floor(100 * random())
random()









T-SQL

関数型

inserted by FC2 system