EasyManuals Logo
Home>Casio>Calculator>ClassPad 300

Casio ClassPad 300 Programming Guide

Casio ClassPad 300
125 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #104 background imageLoading...
Page #104 background image
The parameter dig represents the number of significant digits. So the BCD 555555
passed with a dig of 3 would be 5.55e5.
You can also use the following functions to convert a BCD to format mode of length
digit:
word CP_digit_OBC(OBCD *x,CP_CHAR str[],word digit,
short mode,short dig);
word CP_digit_CMP(CBCD *x,CP_CHAR str[],word digit,
short mode,short dig);
The values for mode can be:
IM_MODE_NORM1
IM_MODE_NORM2
IM_MODE_FIX
IM_MODE_SCI
digit can be one of the following:
IM_DIGIT_9
IM_DIGIT_6
IM_DIGIT_4
digit sets the maximum number of characters that can appear in a BCD. For example, pi
with IM_DIGIT_4 would be 3.14. Pi with IM_DIGIT_6 would be 3.1415
The parameter dig is only used with Sci and Fix modes to determine the number of digits
after the decimal point.
Finally, these two functions can be used to convert a BCD to string in degrees, minutes,
seconds representation:
word CP_dms_OBC(OBCD *x, CP_CHAR str[]);
word CP_dms_CBC(CBCD *x, CP_CHAR str[]);
Here is an example that uses some of these functions:
OBCD x;
Cal_setpi_OBC(&x); // set x = 3.141592654…
CP_CHAR c[100];
CP_Norm_OBC(&x, c, IM_MODE_NORM1); // c=”3.141592654”
CP_Fix_OBC(&x, c, 3); // c=”3.142”
CP_Sci_OBC(&x, c, 2); // c=”3.1e+0”
CP_digit_OBC(&x, c, IM_DIGIT_9, IM_MODE_SCI, 3); // c=”3.14e+0”
104

Table of Contents

Other manuals for Casio ClassPad 300

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Casio ClassPad 300 and is the answer not in the manual?

Casio ClassPad 300 Specifications

General IconGeneral
BrandCasio
ModelClassPad 300
CategoryCalculator
LanguageEnglish

Related product manuals