SW006014 Microchip Technology, SW006014 Datasheet - Page 113
![C COMPILER MPLAB FOR PIC24 MCU](/photos/9/32/93245/sw006014_sml.jpg)
SW006014
Manufacturer Part Number
SW006014
Description
C COMPILER MPLAB FOR PIC24 MCU
Manufacturer
Microchip Technology
Type
MPLAB® C Compilerr
Series
PIC24r
Datasheet
1.SW006014.pdf
(246 pages)
Specifications of SW006014
Supported Families
PIC24
Core Architecture
PIC
Kit Contents
Software And Docs
Mcu Supported Families
PIC24
Tool Function
Compiler
Tool Type
Compiler
Processor Series
PIC24
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
PIC24
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
- Current page: 113 of 246
- Download datasheet (3Mb)
© 2008 Microchip Technology Inc.
srand
Description:
Include:
Prototype:
Argument:
Return Value:
Remarks:
Example:
strtod
Description:
Include:
Prototype:
Arguments:
Return Value:
Remarks:
Set the starting seed for the pseudo-random number sequence.
<stdlib.h>
void srand(unsigned int seed);
seed
None
This function sets the starting seed for the pseudo-random number
sequence generated by the rand function. The rand function will
always return the same sequence of integers when identical seed val-
ues are used. If rand is called with a seed value of 1, the sequence of
numbers generated will be the same as if rand had been called without
srand having been called first.
#include <stdio.h>
#include <stdlib.h> /* for rand, srand */
int main(void)
{
}
Output:
Number = 16327
Number = 5931
Number = 23117
Number = 30985
Number = 29612
Converts a partial string to a floating-point number of type double.
<stdlib.h>
double strtod(const char *s, char **endptr);
s
endptr
Returns the converted number if successful; otherwise, returns 0.
The number may consist of the following:
optional whitespace, followed by an optional sign, then a sequence
of one or more digits with an optional decimal point, followed by one
or more optional digits and an optional e or E followed by an optional
signed exponent.
strtod converts the string until it reaches a character that cannot be
converted to a number. endptr will point to the remainder of the string
starting with the first unconverted character.
If a range error occurs, errno will be set.
int x;
srand(7);
for (x = 0; x < 5; x++)
[whitespace] [sign] digits [.digits]
printf("Number = %d\n", rand());
[ { e | E }[sign]digits]
starting value for the pseudo-random number sequence
string to be converted
pointer to the character at which the conversion stopped
/* for printf
*/
DS51456E-page 109
Related parts for SW006014
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![TC1014-2.7VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
![TC1014-5.0VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
![TC1055-2.5VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
![TC1055-2.7VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
![TC1055-2.8VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
![TC1055-4.0VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
![TC1186-2.5VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet:
![TC1186-2.85VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet: