Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Built-In Functions

Requires

#include <stdlib.h>

Examples:

char string[10];
int x;
strcpy(string,"123");
x = atoi(string);
// x is now 123

Example Files:

input.c

Also See:

printf()

BIT_CLEAR()
Syntax:

bit_clear(var, bit)

Parameters:

var may be a 8,16 or 32 bit variable (any lvalue) bit is a


number 0-31 representing a bit number, 0 is the least
significant bit.

Returns:

undefined

Function:

Simply clears the specified bit (0-7, 0-15 or 0-31) in the


given variable. The least significant bit is 0. This function is
the same as: var &= ~(1<<bit);

Availability:

All devices

Requires

None

Examples:

int x;
x=5;
bit_clear(x,2);
// x is now 1
bit_clear(*11,7); // A crude way to disable ints

Example Files:

ex_patg.c

Also See:

bit_set(), bit_test()

91

You might also like