ugBASIC 1.18
An isomorphic BASIC language compiler for retrocomputers
Loading...
Searching...
No Matches
random.c File Reference
#include "../../ugbc.h"

Go to the source code of this file.

Functions

Variablerandom_value (Environment *_environment, VariableType _type)
 Emit ASM code for = RANDOM.

Function Documentation

◆ random_value()

Variable * random_value ( Environment * _environment,
VariableType _type )

Emit ASM code for = RANDOM.

This function outputs a code suitable for calculating a random value, the range of which depends on the type of data passed as a parameter:

The random value is passed back into a temporary variable.

Parameters
_environmentCurrent calling environment
_typeType of random number to generate
Returns
Variable* The random value calculated

Definition at line 60 of file random.c.