YCPBuiltinInteger.cc File Reference

#include "ycp/YCPBuiltinInteger.h"
#include "ycp/YCPInteger.h"
#include "ycp/YCPString.h"
#include "ycp/YCPFloat.h"
#include "ycp/StaticDeclaration.h"
#include "y2log.h"

Functions

static YCPValue i_plus (const YCPInteger &i1, const YCPInteger &i2)
static YCPValue i_minus (const YCPInteger &i1, const YCPInteger &i2)
static YCPValue i_mult (const YCPInteger &i1, const YCPInteger &i2)
static YCPValue i_div (const YCPInteger &i1, const YCPInteger &i2)
static YCPValue i_mod (const YCPInteger &i1, const YCPInteger &i2)
static YCPValue i_and (const YCPInteger &i1, const YCPInteger &i2)
static YCPValue i_xor (const YCPInteger &i1, const YCPInteger &i2)
static YCPValue i_or (const YCPInteger &i1, const YCPInteger &i2)
static YCPValue i_left (const YCPInteger &i1, const YCPInteger &i2)
static YCPValue i_right (const YCPInteger &i1, const YCPInteger &i2)
static YCPValue i_neg (const YCPInteger &i1)
static YCPValue i_bnot (const YCPInteger &i1)
static YCPValue i_tointeger (const YCPValue &v)
 Converts a value to an integer. If the value can't be converted to an integer, nil is returned.

Variables

StaticDeclaration static_declarations

Function Documentation

static YCPValue i_and const YCPInteger i1,
const YCPInteger i2
[static]
 

integer i1 & integer i2 -> integer Bitwise and of integers.

Examples:

 13 & 8 -> 8
 13 & 7 -> 5
 

static YCPValue i_bnot const YCPInteger i1  )  [static]
 

~ integer i -> integer Bitwise not of integer.

Example:

 ~42 = -43
 

static YCPValue i_div const YCPInteger i1,
const YCPInteger i2
[static]
 

integer i1 / integer i2 -> integer Division of integers.

Examples:

 6 / 2 -> 3
 42 / 0 -> nil
 

static YCPValue i_left const YCPInteger i1,
const YCPInteger i2
[static]
 

integer i1 << integer i2 -> integer Bitwise shift left for integers.

Example:

 8 << 2 -> 32
 

static YCPValue i_minus const YCPInteger i1,
const YCPInteger i2
[static]
 

integer i1 - integer i2 -> integer Subtraction of integers.

Example:

 1 - 2 -> -1
 

static YCPValue i_mod const YCPInteger i1,
const YCPInteger i2
[static]
 

integer i1 % integer i2 -> integer Modulus of integers.

Examples:

 7 % 4 -> 3
 

static YCPValue i_mult const YCPInteger i1,
const YCPInteger i2
[static]
 

integer i1 * integer i2 -> integer Multiplication of integers.

Example:

 2 * 3 -> 6
 

static YCPValue i_neg const YCPInteger i1  )  [static]
 

- integer i -> integer Negative of integer.

static YCPValue i_or const YCPInteger i1,
const YCPInteger i2
[static]
 

integer i1 | integer i2 -> integer Bitwise or of integers.

Examples:

 2 | 2 -> 2
 1 | 4 -> 5
 

static YCPValue i_plus const YCPInteger i1,
const YCPInteger i2
[static]
 

integer i1 + integer i2 -> integer Addition of integers.

Example:

 1 + 2 -> 3
 

static YCPValue i_right const YCPInteger i1,
const YCPInteger i2
[static]
 

integer i1 >> integer i2 -> integer Bitwise shift right for integers.

Example:

 8 >> 2 -> 2
 

static YCPValue i_tointeger const YCPValue v  )  [static]
 

Converts a value to an integer. If the value can't be converted to an integer, nil is returned.

tointeger

Parameters:
any VALUE
Returns:
integer
tointeger (4.03) -> 4 tointeger ("42") -> 42 tointeger ("0x42") -> 66 tointeger ("042") -> 34

static YCPValue i_xor const YCPInteger i1,
const YCPInteger i2
[static]
 

integer i1 ^ integer i2 -> integer Bitwise exclusive or of integers.

Examples:

 2 ^ 7 -> 5
 5 ^ 4 -> 1
 


Variable Documentation

StaticDeclaration static_declarations
 


Generated on Fri Jun 16 18:07:45 2006 for yast2-core by  doxygen 1.4.6