explicit conversion to 32-bit real number: CSng, single

the required type conversion can be carried out as follows:

explicit conversion to 32-bit real number

Description

( type ) expression

Input


Output

Note: In C like languages the data type size may be different depending on compiler and architecture, we show only one standard look.
compatible programing languages:
C | Visual C++ .NET | C++ | C# | Java

Examples

Example

explicit conversion to 32-bit real number the possible of use:
float x = 3.14159265359;  // x = 3.14159274
float y = 123456789;      // y = 123456792.0
y =(float)(x * y);       // z = 387850976.0

CSng

Description

 CSng (expr)
Used keywords: csng

Input


Output

compatible programing languages:
Basic | FreeBASIC | Visual Basic .NET

Examples

Basic

explicit conversion to 32-bit real number the possible of use:
Dim x As single= 3.14159265359  ' x = 3.14159274
Dim y As single= 123456789      ' y = 123456792.0
y =CSng((x * y))       ' z = 387850976.0

single

Description

 single (expr)
Used keywords: single

Input


Output

compatible programing languages:
Pascal | Object Pascal | Free Pascal

Examples

Object Pascal

explicit conversion to 32-bit real number the possible of use:
x:= 3.14159265359;  // x = 3.14159274
y:= 123456789;      // y = 123456792.0
y :=single((x * y));       // z = 387850976.0

you can find it in the following collections: explicit type conversions
explicit conversion to 32-bit real number in another programming language:
Languages: en hu cz sk