Difference between revisions of "WSC and FVM"

From Casio Universal Wiki
Jump to: navigation, search
(List of library functions)
 
(91 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
{{MsgBox|title=Hello !|text=New version ('''1.3''') will be released in next days, stay tunned.|TitleStyle=color:#00FF44;text-decoration:underline;}}
 +
<br/>
 
==Getting Started==
 
==Getting Started==
 
Copy the two files inside the bin folder (WSC.g1a, FVM.g1a) to the calculator.  
 
Copy the two files inside the bin folder (WSC.g1a, FVM.g1a) to the calculator.  
Line 14: Line 16:
 
Enter the text:
 
Enter the text:
 
<pre>void main( )
 
<pre>void main( )
 
 
{
 
{
 
+
      printf( “Hello World!\n” );
    printf( “Hello World!\n” );
 
 
 
 
}</pre>
 
}</pre>
  
(PS the edit can adjust the font size (shift-set up to enter the setting interface), use the small print on one screen you can see more code, it is recommended to use the small print, set the font size in the optn other Word the wrap is also recommended to choose the offrecommended settings below)
+
(P.S. EDIT could adjust the font size(shift--set up to enter the setting interface), you can see more code on a screen by using the small font, it is recommended to use the small print,the recommended settings below)
  
 
[[File:Edit-settings.png]]
 
[[File:Edit-settings.png]]
Line 33: Line 32:
 
[[File:Wsc-fvm-compile-file.jpg]]
 
[[File:Wsc-fvm-compile-file.jpg]]
  
If there are no error, the screen output is done, if there are errors you can return to EDIT to modify. Upon completion any key to exit into the FVM, the F1 (run) the implementation of the bytecode. The screen will output hello world. After the implementation of any key to exit.
+
If there are no errors, the screen will output “Done”, if there are some errors, you can go back to EDIT to modify. After compiling, enter FVM, press F1(run) to run the bytecode file. the screen will output “hello world”
  
 
[[File:Wsc-fvm-hello-f.jpg]][[File:Wsc-fvm-run-hello.jpg]]
 
[[File:Wsc-fvm-hello-f.jpg]][[File:Wsc-fvm-run-hello.jpg]]
Line 42: Line 41:
 
+ - * / % += -= *= /= < <= > >= == != && || ! != &
 
+ - * / % += -= *= /= < <= > >= == != && || ! != &
  
Note that the last '&' is the address instead of a bitwise
+
note the last &is geting address but not bitwise and
  
 
===Data type===
 
===Data type===
  
Any number of dimensions in an int a char a float array to point to the basic types of pointer (pointer to the array)
+
int char float mult-dimensions array pointer(can’t point to array) string constant
  
 
===Statement===
 
===Statement===
  
If the else the while for the return the break
+
if else while for return break
  
 
===Notes===
 
===Notes===
  
C style / * ........... * / and C + + style / / ...........
+
C style /*............*/ and C++ style //............
  
===Function call===
+
===The function===
  
Support recursive.
+
supports recursion, a detailed list of library functions, see [[#WSC_Functions|library section]]
 +
 
 +
===Preprocessor===
 +
 
 +
Simple macro replacement (with parameters) a #define, #include (not a real file contains internal use only)
  
 
==WSC Error reporting==
 
==WSC Error reporting==
Wsc error reporting is not perfect, calculator small screen is not easy to display all error messages.
+
The error reporting of WSC is not perfect,
  
Wsc will be displayed on the screen when the error is detected, the error message, as shown:
+
WSC will displayed the error message when the error is detected, as below:
  
 
[[File:Wsc-error-reporting.jpg]]
 
[[File:Wsc-error-reporting.jpg]]
  
Then press the menu key you can exit to modify the other key to display the next error message.
+
You can press menu key to exit and go back to modify source code. If you press any other key, the next error message will be displayed.
  
 
<font color="red">Note that WSC did not prompt a warning!</font>
 
<font color="red">Note that WSC did not prompt a warning!</font>
  
Any pointers, arrays, in its eyes are the same, any assignment.
+
Any pointers, arrays are the same in its eyes,
  
int, a char, float, assignment, will not generate any warning messages.
+
Any assignment between int, char, float will not generate any errors.
 +
 
 +
A function that return type is not ‘void’ don’t return a value will not generate any errors.
  
 
==Some differences in the WSC with the standard C==
 
==Some differences in the WSC with the standard C==
 +
There ary some differences between the WSC and the standard C.
  
===Does not require the function declaration===
+
===Doesn’t require the function declaration===
  
As long as the function is defined in the file, regardless of location, can call anywhere.
+
As long as the function is defined in the file, regardless of location, you can call anywhere.
  
 
===Only two scopes===
 
===Only two scopes===
  
The entire procedure only two scope, global scope and function within the local scope.
+
The program has only two scopes, global scope and local scope of funcion.
  
 
<pre>void main()
 
<pre>void main()
 
 
{
 
{
 
 
int a;
 
int a;
 
 
{
 
{
 
 
     int a;
 
     int a;
 
 
}
 
}
 
 
}</pre>
 
}</pre>
  
The example program will receive an error message "Variable 'a' redefinition"
+
the example program will recerve an error message “Variable ‘a’ redefinition”
  
 
===int * a, b;===
 
===int * a, b;===
 
+
a and b will both be a pointer.(so, it recommended that written int* a, b; but not int *a, b;);
WSC a and b will be a pointer to int. (It is recommended that written int * a, b; instead of int * a, b;).
 
  
 
===int *p; p++;===
 
===int *p; p++;===
The actual value of p in the ANSI C plus 4 (sizeof (int)), but WSC will only p plus 1.
+
The actual value of p will add 4(i.e. sizeof(int) ) in the ANSI C, but WSC will only let p add 1
  
 
===char s[50] = “asdfjkl”;===
 
===char s[50] = “asdfjkl”;===
Line 112: Line 111:
  
 
===int a[2][2] = { 1, 2, 3, 4 };===
 
===int a[2][2] = { 1, 2, 3, 4 };===
Int a [2] [2] = {1, 2, 3, 4};
+
This initialization is not yet supported, sample sentence is wrong.
 +
 
 +
Mult-idimensional array initialization must be grouped properly, such as
  
This initialization is not yet supported, sample sentence is wrong. Multidimensional array initialization must be properly grouped, such as
+
int a[2][2] = { {1, 2}, {3, 4} };
  
int a[2][2] = { {1, 2}, {3, 4} }; grouped correctly less some elements correctly, such as
+
the follow is alse correct:
  
int a[2][2] = { {1}, {3} }
+
int a[2][2] = { {1}, {3} };
  
==Notice==
+
==Notice & Tips==
  
 
===int a[10];printf( “%d”, a );===
 
===int a[10];printf( “%d”, a );===
The code writer's intent is to obtain the value of a, but as mentioned above, the WSC seen as a type of all pointers, printf library function is overloaded, and the second parameter is a pointer to a function only printf (char *, char *), so the compiler to do a wrong choice, a look has become a char *.
+
The programmer’s intent is to get the value of a. But as mentioned above, all the pointer are the same in WSC, WSC see a as a pointer to char. so some errors occur.
 +
 
 +
a correct way as follw:
  
A correct approach is int a [10]; int t = a; printf ("% d", t);
+
int a[10]; int t = a; printf( %d”, t );
  
 
===char ch;scanf( “%c”, &ch );===
 
===char ch;scanf( “%c”, &ch );===
For some reason, such an approach to problems, it is recommended to use getchar ();
+
For some reasons, the statement is wrong, it is recommended to use getchar();
  
 
===Enter the uppercase letters===
 
===Enter the uppercase letters===
Press F6 in the input interface switch case.
+
Press F6 in the input interface, than you can enter the uppercase letters
 +
 
 +
===FVM will automatically initialize the random number seed===
 +
Don’t require the programmer calling srand();
 +
 
 +
===Enter the uppercase letters===
 +
 
 +
Press F6 in the input interface switch case
 +
 
 +
===Set up multiple strong back===
 +
 
 +
<pre>#progma FORCE_BREAK</pre>
 +
 
 +
add the statement above in the source code, then you can hold down F1 + F2 + F6 to force quit the running program.
 +
 
 +
===Use a large font in the IO interface===
 +
 
 +
<pre># progma BIG_FONT</pre>
 +
 
 +
The above statement can be added anywhere in the source code
 +
 
 +
===FVM program size limit===
 +
FVM procedure 10kb (not source code, is the f files), if your program is outside this range, use exefvm function
 +
 
 +
===FVM execution environment===
 +
 
 +
The default memory (in this case refers to a static area and stack area) 8kb, you can redefine the following statement
 +
 
 +
<pre>#progma RAM_SIZE 10240 // set to 10240kb = 10kb</pre>
 +
 
 +
The size of the heap area depends on the calculator
 +
 
 +
If you need exefvm other programs, it is recommended call program RAM_SIZE set
  
 
==List of library functions==
 
==List of library functions==
Has now completed most of 9860 to support the c standard functions, the next version will be added to the SDK functions.
+
note printf, sprintf, scanf, sscanf are overloading functions, they don’t have variable argument list
  
printf, sprintf, scanf, sscanf is the overloaded function. Note that they do not have a variable argument list
 
  
<table cellspacing="0" cellpadding="0" border="1" style="border-collapse:collapse;border:none;mso-border-alt:solid windowtext .5pt;
+
<table border=1 cellspacing=0 cellpadding=0>
mso-yfti-tbllook:480;mso-padding-alt:0cm 5.4pt 0cm 5.4pt;mso-border-insideh:
+
     <tr>
.5pt solid windowtext;mso-border-insidev:.5pt solid windowtext" class="MsoTableGrid">
+
       <td width=119 rowspan=14 valign=top><p style='  line-height:normal'><span
  <tbody>
+
  class=SpellE><b><span lang=EN-US
     <tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes">
+
  style='font-size:14.0pt;font-family:SimSun;
       <td width="119" valign="top" style="width:89.6pt;border:solid windowtext 1.0pt;
+
  '>stdio.h</span></b></span></p></td>
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt" rowspan="14"><p class="MsoNormal"><span lang="EN-US">
+
      <td width=456 valign=top><p style='  line-height:normal'><span class=SpellE><span lang=EN-US style='font-size:
          &nbsp;
+
  12.0pt;font-family:SimSun;'>int</span></span><span lang=EN-US
          </span></p>
+
  style='font-size:12.0pt;font-family:SimSun;
        <p class="MsoNormal"><span lang="EN-US">
+
   '> <span class=SpellE>printf</span>(
          &nbsp;
+
           char *format, <span class=SpellE>int</span> <span class=SpellE>val</span> )</span></p></td>
          </span></p>
 
        <p class="MsoNormal"><span lang="EN-US">
 
          &nbsp;
 
          </span></p>
 
        <p class="MsoNormal"><span lang="EN-US">
 
          &nbsp;
 
          </span></p>
 
        <p class="MsoNormal"><span lang="EN-US">
 
          &nbsp;
 
          </span></p>
 
        <p class="MsoNormal"><span lang="EN-US">
 
          &nbsp;
 
          </span></p>
 
        <p style="text-indent:6.9pt;mso-char-indent-count:.49" class="MsoNormal"><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:14.0pt;
 
  font-family:SimSun">stdio.h
 
         
 
          </span></b></p></td>
 
      <td width="456" valign="top" style="width:341.7pt;border:solid windowtext 1.0pt;
 
  border-left:none;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:
 
   solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">int printf(
 
           char *format, int val )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:1">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span class=SpellE><span lang=EN-US style='font-size:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   12.0pt;font-family:SimSun;'>int</span></span><span lang=EN-US
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
   style='font-size:12.0pt;font-family:SimSun;
   mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">int printf(
+
   '> <span class=SpellE>printf</span>(
           char *format, float val )
+
           char *format, float <span class=SpellE>val</span> )</span></p></td>
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:2">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span class=SpellE><span lang=EN-US style='font-size:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   12.0pt;font-family:SimSun;'>int</span></span><span lang=EN-US
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
   style='font-size:12.0pt;font-family:SimSun;
   mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">int printf( char
+
   '> <span class=SpellE>printf</span>(
           *format, char* val )
+
           char *format, char* <span class=SpellE>val</span> )</span></p></td>
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:3">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span class=SpellE><span lang=EN-US style='font-size:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   12.0pt;font-family:SimSun;'>int</span></span><span lang=EN-US
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
   style='font-size:12.0pt;font-family:SimSun;
   mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">int sprintf(
+
   '> <span class=SpellE>sprintf</span>(
           char *buffer, char *format, int val )
+
           char *buffer, char *format, <span class=SpellE>int</span> <span class=SpellE>val</span> )</span></p></td>
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:4">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span class=SpellE><span lang=EN-US style='font-size:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   12.0pt;font-family:SimSun;'>int</span></span><span lang=EN-US
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
   style='font-size:12.0pt;font-family:SimSun;
   mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">int sprintf(
+
   '> <span class=SpellE>sprintf</span>(
           char *buffer, char *format, float val )
+
           char *buffer, char *format, float <span class=SpellE>val</span> )</span></p></td>
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:5">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span class=SpellE><span lang=EN-US style='font-size:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   12.0pt;font-family:SimSun;'>int</span></span><span lang=EN-US
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
   style='font-size:12.0pt;font-family:SimSun;
   mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">int sprintf(
+
   '> <span class=SpellE>sprintf</span>(
           char *buffer, char *format, char* val )
+
           char *buffer, char *format, char* <span class=SpellE>val</span> )</span></p></td>
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:6">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span class=SpellE><span lang=EN-US style='font-size:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   12.0pt;font-family:SimSun;'>int</span></span><span lang=EN-US
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
   style='font-size:12.0pt;font-family:SimSun;
   mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">int scanf(
+
   '> <span class=SpellE>scanf</span>(
           char *format, int *address )
+
           char *format, <span class=SpellE>int</span> *address )</span></p></td>
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:7">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span class=SpellE><span lang=EN-US style='font-size:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   12.0pt;font-family:SimSun;'>int</span></span><span lang=EN-US
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
   style='font-size:12.0pt;font-family:SimSun;
   mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">int scanf( char
+
   '> <span class=SpellE>scanf</span>(
           *format, float *address )</span></p></td>
+
           char *format, float *address )</span></p></td>
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:8">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span class=SpellE><span lang=EN-US style='font-size:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   12.0pt;font-family:SimSun;'>int</span></span><span lang=EN-US
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
   style='font-size:12.0pt;font-family:SimSun;
   mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">int scanf(
+
   '> <span class=SpellE>scanf</span>(
 
           char *format, char *address )</span></p></td>
 
           char *format, char *address )</span></p></td>
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:9">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span class=SpellE><span lang=EN-US style='font-size:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   12.0pt;font-family:SimSun;'>int</span></span><span lang=EN-US
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
   style='font-size:12.0pt;font-family:SimSun;
   mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">int sscanf(
+
   '> <span class=SpellE>sscanf</span>(
           char *buffer, char *format, int *address )
+
           char *buffer, char *format, <span class=SpellE>int</span> *address )</span></p></td>
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:10">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span class=SpellE><span lang=EN-US style='font-size:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   12.0pt;font-family:SimSun;'>int</span></span><span lang=EN-US
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
   style='font-size:12.0pt;font-family:SimSun;
   mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">int sscanf(
+
   '> <span class=SpellE>sscanf</span>(
           char *buffer, char *format, int *address )
+
           char *buffer, char *format, <span class=SpellE>int</span> *address )</span></p></td>
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:11">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span class=SpellE><span lang=EN-US style='font-size:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   12.0pt;font-family:SimSun;'>int</span></span><span lang=EN-US
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
   style='font-size:12.0pt;font-family:SimSun;
   mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">int sscanf(
+
   '> <span class=SpellE>sscanf</span>(
 
           char *buffer, char *format, float *address )</span></p></td>
 
           char *buffer, char *format, float *address )</span></p></td>
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:12">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span class=SpellE><span lang=EN-US style='font-size:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   12.0pt;font-family:SimSun;'>int</span></span><span lang=EN-US
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
   style='font-size:12.0pt;font-family:SimSun;
   mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">int getchar(
+
   '> <span class=SpellE>getchar</span>(
           void )
+
           void )</span></p></td>
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:13;height:13.15pt">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span class=SpellE><span lang=EN-US style='font-size:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   12.0pt;font-family:SimSun;'>int</span></span><span lang=EN-US
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
   style='font-size:12.0pt;font-family:SimSun;
   mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:13.15pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">int putchar(
+
   '> <span class=SpellE>putchar</span>( <span class=SpellE>int</span> c )</span></p></td>
          int c )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:14">
+
     <tr>
       <td width="119" valign="top" style="width:89.6pt;border:solid windowtext 1.0pt;
+
       <td width=119 rowspan=12 valign=top><p align=center style='text-align:center;line-height:normal'><span class=SpellE><b><span lang=EN-US style='font-size:14.0pt;
  border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+
  font-family:SimSun;'>ctype.h</span></b></span></p></td>
  padding:0cm 5.4pt 0cm 5.4pt" rowspan="12"><p class="MsoNormal"><span lang="EN-US">
+
      <td width=456 valign=top><p style='  line-height:normal'><span class=SpellE><span lang=EN-US style='font-size:
          &nbsp;
+
  12.0pt;font-family:SimSun;'>int</span></span><span lang=EN-US
          </span></p>
+
   style='font-size:12.0pt;font-family:SimSun;
        <p class="MsoNormal"><span lang="EN-US">
+
   '> <span class=SpellE>isalnum</span>( <span class=SpellE>int</span> c )</span></p></td>
          &nbsp;
 
          </span></p>
 
        <p class="MsoNormal"><span lang="EN-US">
 
          &nbsp;
 
          </span></p>
 
        <p class="MsoNormal"><span lang="EN-US">
 
          &nbsp;
 
          </span></p>
 
        <p class="MsoNormal"><span lang="EN-US">
 
          &nbsp;
 
          </span></p>
 
        <p class="MsoNormal"><span lang="EN-US">
 
          &nbsp;
 
          </span></p>
 
        <p align="center" style="text-align:center" class="MsoNormal"><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:14.0pt;
 
  font-family:SimSun">ctype.h
 
         
 
          </span></b></p></td>
 
      <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
 
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
 
  mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
 
   mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">int isalnum(
 
          int c )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:15">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span class=SpellE><span lang=EN-US style='font-size:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   12.0pt;font-family:SimSun;'>int</span></span><span lang=EN-US
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
   style='font-size:12.0pt;font-family:SimSun;
   mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">int isalpha(
+
   '> <span class=SpellE>isalpha</span>( <span class=SpellE>int</span> c )</span></p></td>
          int c )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:16">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span class=SpellE><span lang=EN-US style='font-size:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   12.0pt;font-family:SimSun;'>int</span></span><span lang=EN-US
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
   style='font-size:12.0pt;font-family:SimSun;
   mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">int iscntrl(
+
   '> <span class=SpellE>iscntrl</span>( <span class=SpellE>int</span> c )</span></p></td>
          int c )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:17">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span class=SpellE><span lang=EN-US style='font-size:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   12.0pt;font-family:SimSun;'>int</span></span><span lang=EN-US
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
   style='font-size:12.0pt;font-family:SimSun;
   mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">int isdigit(
+
   '> <span class=SpellE>isdigit</span>( <span class=SpellE>int</span> c )</span></p></td>
          int c )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:18">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span class=SpellE><span lang=EN-US style='font-size:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   12.0pt;font-family:SimSun;'>int</span></span><span lang=EN-US
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
   style='font-size:12.0pt;font-family:SimSun;
   mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">int isgraph(
+
   '> <span class=SpellE>isgraph</span>( <span class=SpellE>int</span> c )</span></p></td>
          int c )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:19">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span class=SpellE><span lang=EN-US style='font-size:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   12.0pt;font-family:SimSun;'>int</span></span><span lang=EN-US
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
   style='font-size:12.0pt;font-family:SimSun;
   mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">int islower(
+
   '> <span class=SpellE>islower</span>( <span class=SpellE>int</span> c )</span></p></td>
          int c )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:20">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span class=SpellE><span lang=EN-US style='font-size:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   12.0pt;font-family:SimSun;'>int</span></span><span lang=EN-US
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
   style='font-size:12.0pt;font-family:SimSun;
   mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">int isprint(
+
   '> <span class=SpellE>isprint</span>( <span class=SpellE>int</span> c )</span></p></td>
          int c )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:21">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span class=SpellE><span lang=EN-US style='font-size:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   12.0pt;font-family:SimSun;'>int</span></span><span lang=EN-US
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
   style='font-size:12.0pt;font-family:SimSun;
   mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">int ispunct( int
+
   '> <span class=SpellE>ispunct</span>( <span class=SpellE>int</span> c )</span></p></td>
          c )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:22">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span class=SpellE><span lang=EN-US style='font-size:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   12.0pt;font-family:SimSun;'>int</span></span><span lang=EN-US
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
   style='font-size:12.0pt;font-family:SimSun;
   mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">int isspace(
+
   '> <span class=SpellE>isspace</span>( <span class=SpellE>int</span> c )</span></p></td>
          int c )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:23">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span class=SpellE><span lang=EN-US style='font-size:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   12.0pt;font-family:SimSun;'>int</span></span><span lang=EN-US
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
   style='font-size:12.0pt;font-family:SimSun;
   mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">int isupper(
+
   '> <span class=SpellE>isupper</span>( <span class=SpellE>int</span> c )</span></p></td>
          int c )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:24">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span class=SpellE><span lang=EN-US style='font-size:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   12.0pt;font-family:SimSun;'>int</span></span><span lang=EN-US
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
   style='font-size:12.0pt;font-family:SimSun;
   mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">int tolower(
+
   '> <span class=SpellE>tolower</span>( <span class=SpellE>int</span> c )</span></p></td>
          int c )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:25">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span class=SpellE><span lang=EN-US style='font-size:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   12.0pt;font-family:SimSun;'>int</span></span><span lang=EN-US
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
   style='font-size:12.0pt;font-family:SimSun;
   mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">int toupper(
+
   '> <span class=SpellE>toupper</span>( <span class=SpellE>int</span> c )</span></p></td>
          int c )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:26">
+
     <tr>
       <td width="119" valign="top" style="width:89.6pt;border:solid windowtext 1.0pt;
+
       <td width=119 rowspan=19 valign=top><p style='  line-height:normal'><span
  border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+
  class=SpellE><b><span lang=EN-US
  padding:0cm 5.4pt 0cm 5.4pt" rowspan="19"><p class="MsoNormal"><span lang="EN-US">
+
  style='font-size:14.0pt;font-family:SimSun;
          &nbsp;
+
  '>math.h</span></b></span></p></td>
          </span></p>
+
      <td width=456 valign=top><p style='  line-height:normal'><span lang=EN-US style='font-size:12.0pt;font-family:
        <p class="MsoNormal"><span lang="EN-US">
+
   SimSun; '>float <span class=SpellE>acos</span>( float x )</span></p></td>
          &nbsp;
 
          </span></p>
 
        <p class="MsoNormal"><span lang="EN-US">
 
          &nbsp;
 
          </span></p>
 
        <p class="MsoNormal"><span lang="EN-US">
 
          &nbsp;
 
          </span></p>
 
        <p class="MsoNormal"><span lang="EN-US">
 
          &nbsp;
 
          </span></p>
 
        <p class="MsoNormal"><span lang="EN-US">
 
          &nbsp;
 
          </span></p>
 
        <p class="MsoNormal"><span lang="EN-US">
 
          &nbsp;
 
          </span></p>
 
        <p class="MsoNormal"><span lang="EN-US">
 
          &nbsp;
 
          </span></p>
 
        <p class="MsoNormal"><span lang="EN-US">
 
          &nbsp;
 
          </span></p>
 
        <p style="text-indent:13.75pt;mso-char-indent-count:.98" class="MsoNormal"><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:14.0pt;
 
  font-family:SimSun">math.h</span></b></p></td>
 
      <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
 
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
 
  mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
 
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">float acos(
 
          float x )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:27">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span lang=EN-US style='font-size:12.0pt;font-family:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   SimSun; '>float <span class=SpellE>asin</span>( float x )</span></p></td>
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
 
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">float asin(
 
          float x )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:28">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span lang=EN-US style='font-size:12.0pt;font-family:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   SimSun; '>float <span class=SpellE>atan</span>( float x )</span></p></td>
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
 
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">float atan(
 
          float x )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:29">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span lang=EN-US style='font-size:12.0pt;font-family:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
  SimSun;  '>float atan2( float x, float y )</span></p></td>
  mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
 
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">float <a name="OLE_LINK6"></a><a name="OLE_LINK5"><span style="mso-bookmark:OLE_LINK6">atan2</span></a>(
 
          float x, float y )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:30">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span lang=EN-US style='font-size:12.0pt;font-family:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   SimSun; '>float <span class=SpellE>cos</span>( float x )</span></p></td>
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
 
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">float cos( float
 
          x )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:31">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span lang=EN-US style='font-size:12.0pt;font-family:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
  SimSun;  '>float sin( float x )</span></p></td>
  mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
 
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">float sin(
 
          float x )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:32">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span lang=EN-US style='font-size:12.0pt;font-family:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
  SimSun;  '>float tan( float x )</span></p></td>
  mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
 
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">float tan(
 
          float x )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:33">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span lang=EN-US style='font-size:12.0pt;font-family:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   SimSun; '>float <span class=SpellE>cosh</span>( float x )</span></p></td>
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
 
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">float cosh(
 
          float x )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:34">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span lang=EN-US style='font-size:12.0pt;font-family:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   SimSun; '>float <span class=SpellE>sinh</span>( float x )</span></p></td>
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
 
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">float sinh(
 
          float x )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:35">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span lang=EN-US style='font-size:12.0pt;font-family:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   SimSun; '>float <span class=SpellE>tanh</span>( float x )</span></p></td>
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
 
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">float tanh(
 
          float x )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:36">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span lang=EN-US style='font-size:12.0pt;font-family:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
  SimSun;  '>float log( float x )</span></p></td>
  mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
 
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">float log(
 
          float x )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:37">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span lang=EN-US style='font-size:12.0pt;font-family:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
  SimSun;  '>float log10( float x )</span></p></td>
  mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
 
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">float log10(
 
          float x )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:38">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span lang=EN-US style='font-size:12.0pt;font-family:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   SimSun; '>float <span class=SpellE>modf</span>( float x, float
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
          *y )</span></p></td>
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">float modf(
 
          float x, float *y )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:39">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span lang=EN-US style='font-size:12.0pt;font-family:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   SimSun; '>float <span class=SpellE>pow</span>( float x, float
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
          y )</span></p></td>
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">float pow( float
 
          x, float y )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:40">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span lang=EN-US style='font-size:12.0pt;font-family:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   SimSun; '>float <span class=SpellE>sqrt</span>( float x )</span></p></td>
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
 
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">float sqrt(
 
          float x )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:41">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span lang=EN-US style='font-size:12.0pt;font-family:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
  SimSun;  '>float ceil( float x )</span></p></td>
  mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
 
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">float ceil(
 
          float x )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:42">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span lang=EN-US style='font-size:12.0pt;font-family:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   SimSun; '>float <span class=SpellE>fabs</span>( float x )</span></p></td>
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
 
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">float fabs(
 
          float x )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:43">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span lang=EN-US style='font-size:12.0pt;font-family:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
  SimSun;  '>float floor( float x )</span></p></td>
  mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
 
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">float floor(
 
          float x )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:44">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span lang=EN-US style='font-size:12.0pt;font-family:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   SimSun; '>float <span class=SpellE>fmod</span>( float x, float
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
          y )</span></p></td>
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">float fmod(
 
          float x, float y )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:45">
+
     <tr>
       <td width="119" valign="top" style="width:89.6pt;border:solid windowtext 1.0pt;
+
       <td width=119 rowspan=10 valign=top><p style='  line-height:normal'><span
  border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+
   class=SpellE><b><span lang=EN-US
   padding:0cm 5.4pt 0cm 5.4pt" rowspan="9"><p class="MsoNormal"><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:14.0pt;font-family:SimSun">
+
  style='font-size:14.0pt;font-family:SimSun;
          &nbsp;
+
  '>stdlib.h</span></b></span></p></td>
          </span></b></p>
+
      <td width=456 valign=top><p style='  line-height:normal'><span lang=EN-US style='font-size:12.0pt;font-family:
        <p class="MsoNormal"><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:14.0pt;font-family:SimSun">
+
  SimSun;  '>float <span class=SpellE>atof</span>( char *<span
          &nbsp;
+
   class=SpellE>str</span> )</span></p></td>
          </span></b></p>
 
        <p style="text-indent:6.9pt;mso-char-indent-count:.49" class="MsoNormal"><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:14.0pt;
 
  font-family:SimSun">stdlib.h</span></b></p></td>
 
      <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
 
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
 
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
 
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">float atof(
 
          char *str )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:46">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span class=SpellE><span lang=EN-US style='font-size:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   12.0pt;font-family:SimSun;'>int</span></span><span lang=EN-US
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
   style='font-size:12.0pt;font-family:SimSun;
   mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">int atoi( char
+
   '> <span class=SpellE>atoi</span>(
           *str )
+
           char *<span class=SpellE>str</span> )</span></p></td>
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:47">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span class=SpellE><span lang=EN-US style='font-size:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   12.0pt;font-family:SimSun;'>int</span></span><span lang=EN-US
  mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
  style='font-size:12.0pt;font-family:SimSun;
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">int rand( void
+
  '> rand( void )</span></p></td>
          )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
    <tr style="mso-yfti-irow:48">
+
 
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
<tr>
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
       <td width=456 valign=top><p style='  line-height:normal'><span class=SpellE><span lang=EN-US style='font-size:
  mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
  12.0pt;font-family:SimSun;'>#define RAND_MAX 32767</span></span></p></td>
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">void srand(
 
          int seed )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:49">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span lang=EN-US style='font-size:12.0pt;font-family:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   SimSun; '>void <span class=SpellE>srand</span>( <span
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
  class=SpellE>int</span> seed )</span></p></td>
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">void *calloc(
 
          int nelem, int elsize )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:50">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span lang=EN-US style='font-size:12.0pt;font-family:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   SimSun; '>void *<span class=SpellE>calloc</span>( <span
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
   class=SpellE>int</span> <span class=SpellE>nelem</span>, <span class=SpellE>int</span> <span class=SpellE>elsize</span> )</span></p></td>
   mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">void *malloc(
 
          int size )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:51">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span lang=EN-US style='font-size:12.0pt;font-family:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   SimSun; '>void *<span class=SpellE>malloc</span>( <span
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
  class=SpellE>int</span> size )</span></p></td>
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">void *calloc(
 
          void *ptr, int size )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:52;height:5.85pt">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span lang=EN-US style='font-size:12.0pt;font-family:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   SimSun; '>void *<span class=SpellE>calloc</span>( void *<span
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
  class=SpellE>ptr</span>, <span class=SpellE>int</span> size )</span></p></td>
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:5.85pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">void free(
 
          void *ptr )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:53">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p><span lang=EN-US style='font-size:12.0pt;
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   font-family:SimSun;'>void free( void *<span class=SpellE>ptr</span> )</span></p></td>
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
 
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">int abs( int x
 
          )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:54">
+
     <tr>
       <td width="119" valign="top" style="width:89.6pt;border:solid windowtext 1.0pt;
+
       <td width=456 valign=top><p style='  line-height:normal'><span class=SpellE><span lang=EN-US style='font-size:
  border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
+
  12.0pt;font-family:SimSun;'>int</span></span><span lang=EN-US
  padding:0cm 5.4pt 0cm 5.4pt" rowspan="18"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">
+
  style='font-size:12.0pt;font-family:SimSun;
          &nbsp;
+
   '> abs( <span class=SpellE>int</span> x )</span></p></td>
          </span></p>
 
        <p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">
 
          &nbsp;
 
          </span></p>
 
        <p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">
 
          &nbsp;
 
          </span></p>
 
        <p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">
 
          &nbsp;
 
          </span></p>
 
        <p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">
 
          &nbsp;
 
          </span></p>
 
        <p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">
 
          &nbsp;
 
          </span></p>
 
        <p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">
 
          &nbsp;
 
          </span></p>
 
        <p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">
 
          &nbsp;
 
          </span></p>
 
        <p style="text-indent:6.9pt;mso-char-indent-count:.49" class="MsoNormal"><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:14.0pt;
 
  font-family:SimSun">string.h
 
         
 
          </span></b></p></td>
 
      <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
 
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
 
  mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
 
   mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">void memcpy(
 
          void *p1, void *p2, int n )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:55">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=119 rowspan=18 valign=top><p style='  line-height:normal'><span
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
  class=SpellE><b><span lang=EN-US
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
   style='font-size:14.0pt;font-family:SimSun;
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">char *strcpy(
+
   '>string.h</span></b></span></p></td>
           char *s1, char *s2 )
+
      <td width=456 valign=top><p style='  line-height:normal'><span lang=EN-US style='font-size:12.0pt;font-family:
         
+
  SimSun;  '>void <span class=SpellE>memcpy</span>( void *p1,
          </span></p></td>
+
           void *p2, <span class=SpellE>int</span> n )</span></p></td>
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:56">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span lang=EN-US style='font-size:12.0pt;font-family:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   SimSun; '>char *<span class=SpellE>strcpy</span>( char *s1,
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
          char *s2 )</span></p></td>
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">char *strncpy(
 
          char *s1, char *s2, int n )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:57">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span lang=EN-US style='font-size:12.0pt;font-family:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   SimSun; '>char *<span class=SpellE>strncpy</span>( char *s1,
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
          char *s2, <span class=SpellE>int</span> n )</span></p></td>
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">char *strcat(
 
          char *s1, char *s2 )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:58">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span lang=EN-US style='font-size:12.0pt;font-family:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   SimSun; '>char *<span class=SpellE>strcat</span>( char *s1,
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
          char *s2 )</span></p></td>
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">char *strncat(
 
          char *s1, char *s2, int n )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:59">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span lang=EN-US style='font-size:12.0pt;font-family:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   SimSun; '>char *<span class=SpellE>strncat</span>( char *s1,
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
           char *s2, <span class=SpellE>int</span> n )</span></p></td>
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">int memcmp(
 
           void *p1, void *p2, int n )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:60">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span class=SpellE><span lang=EN-US style='font-size:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   12.0pt;font-family:SimSun;'>int</span></span><span lang=EN-US
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
   style='font-size:12.0pt;font-family:SimSun;
   mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">int strcmp(
+
   '> <span class=SpellE>memcmp</span>(
           char *s1, char *s2 )
+
           void *p1, void *p2, <span class=SpellE>int</span> n )</span></p></td>
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:61">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span class=SpellE><span lang=EN-US style='font-size:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   12.0pt;font-family:SimSun;'>int</span></span><span lang=EN-US
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
   style='font-size:12.0pt;font-family:SimSun;
   mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">int strncmp(
+
   '> <span class=SpellE>strcmp</span>(
           char *s1, char *s2, int n )
+
           char *s1, char *s2 )</span></p></td>
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:62">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span class=SpellE><span lang=EN-US style='font-size:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   12.0pt;font-family:SimSun;'>int</span></span><span lang=EN-US
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
   style='font-size:12.0pt;font-family:SimSun;
   mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">void *memchr(
+
   '> <span class=SpellE>strncmp</span>(
           void *p, int c, int n )
+
           char *s1, char *s2, <span class=SpellE>int</span> n )</span></p></td>
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:63">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span lang=EN-US style='font-size:12.0pt;font-family:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   SimSun; '>void *<span class=SpellE>memchr</span>( void *p, <span
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
  class=SpellE>int</span> c, <span class=SpellE>int</span> n )</span></p></td>
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">char *strchr(
 
          char *s, int c )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:64">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span lang=EN-US style='font-size:12.0pt;font-family:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   SimSun; '>char *<span class=SpellE>strchr</span>( char *s, <span
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
  class=SpellE>int</span> c )</span></p></td>
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">int strcspn(
 
          char *s1, char *s2 )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:65">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span class=SpellE><span lang=EN-US style='font-size:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   12.0pt;font-family:SimSun;'>int</span></span><span lang=EN-US
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
   style='font-size:12.0pt;font-family:SimSun;
   mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">char *strpbrk(
+
   '> <span class=SpellE>strcspn</span>(
           char *s1, char *s2 )
+
           char *s1, char *s2 )</span></p></td>
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:66">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span lang=EN-US style='font-size:12.0pt;font-family:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   SimSun; '>char *<span class=SpellE>strpbrk</span>( char *s1,
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
           char *s2 )</span></p></td>
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">char *strrchr(
 
           char *s, int c )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:67">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span lang=EN-US style='font-size:12.0pt;font-family:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   SimSun; '>char *<span class=SpellE>strrchr</span>( char *s, <span
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
  class=SpellE>int</span> c )</span></p></td>
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">int strspn( char
 
          *s1, char *s2 )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:68">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span class=SpellE><span lang=EN-US style='font-size:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   12.0pt;font-family:SimSun;'>int</span></span><span lang=EN-US
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
   style='font-size:12.0pt;font-family:SimSun;
   mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">char *strstrr(
+
   '> <span class=SpellE>strspn</span>(
           char *s1, char *s2 )
+
           char *s1, char *s2 )</span></p></td>
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:69">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span lang=EN-US style='font-size:12.0pt;font-family:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   SimSun; '>char *<span class=SpellE>strstrr</span>( char *s1,
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
           char *s2 )</span></p></td>
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">void memset(
 
           void *s, int c, int n )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:70">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span lang=EN-US style='font-size:12.0pt;font-family:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   SimSun; '>void <span class=SpellE>memset</span>( void *s, <span
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
  class=SpellE>int</span> c, <span class=SpellE>int</span> n )</span></p></td>
  mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">int strlen(
 
          char *s )
 
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
     <tr style="mso-yfti-irow:71;mso-yfti-lastrow:yes">
+
     <tr>
       <td width="456" valign="top" style="width:341.7pt;border-top:none;border-left:
+
       <td width=456 valign=top><p style='  line-height:normal'><span class=SpellE><span lang=EN-US style='font-size:
   none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
+
   12.0pt;font-family:SimSun;'>int</span></span><span lang=EN-US
   mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
+
   style='font-size:12.0pt;font-family:SimSun;
   mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US" style="font-family:SimSun">void *memmove(
+
   '> <span class=SpellE>strlen</span>(
           void *s1, void *s2, int n )
+
           char *s )</span></p></td>
         
 
          </span></p></td>
 
 
     </tr>
 
     </tr>
   </tbody>
+
    <tr>
 +
      <td width=456 valign=top><p style='  line-height:normal'><span lang=EN-US style='font-size:12.0pt;font-family:
 +
  SimSun;  '>void *<span class=SpellE>memmove</span>( void *s1,
 +
          void *s2, <span class=SpellE>int</span> n )</span></p></td>
 +
    </tr>
 +
  </table>
 +
 
 +
===WSC Functions===
 +
To use the following functions and definitions, include '''fxlib.h'''<br/>
 +
All the graphing function draw to VRAM, programmer should use putdisp() to put VRAM to Display Driver.<br/>
 +
The range fo abscissa(x) of pointers is from 0 to 127.<br/>
 +
The range fo ordinate(y) of pointers is from 0 to 63.
 +
 
 +
====void allclr( void )====
 +
Clear the whole area
 +
 
 +
====void areaclr( int x1, int y1, int x2, int y2 )====
 +
Clear the specified area<br/>
 +
(x1, y1) is the upper-left conner of rectangle. (x2, y2) is the lower-right corner of rectangle.
 +
 
 +
====void arearev( int x1, int y1, int x2, int y2 )====
 +
Reverses a specified area<br/>
 +
(x1, y1) is the upper-left conner of rectangle. (x2, y2) is the lower-right corner of rectangle.
 +
 
 +
====void putdisp( void )====
 +
Put all data from VRAM to Display Driver.
 +
 
 +
====void setpoint( int x, int y, char kind )====
 +
Set or erase a dot at the specified  position.<br/>
 +
If you set point to 1 then the dot is made black. If you set point to 0 then the dot is cleared.
 +
 
 +
====int getpoint( int x, ing y )====
 +
Checks a dot at the specified position<br/>
 +
If the dot at the specified position is black then this function returns 1. If the dot at the specified position is white then this function returns 0.
 +
 
 +
====void drawline( int x1, int y1, int x2, int y2 )====
 +
Draws a line from (x1, y1) to (x2, y2)
 +
 
 +
====void clearline( int x1, int y1, int x2, int y2 )====
 +
Draws a white line from (x1, y1) to (x2, y2)
 +
 
 +
====void drawcircle( int x, int y, int r )====
 +
Draws a circle at (x,y)
 +
 
 +
====void fillcircle( int x, int y, int r )====
 +
Draws a filled circle at (x,y)
 +
 
 +
====void drawbox( int x1, int y1, int x2, int y2 )====
 +
Draws a box, (x1, y1) is the upper-left conner of rectangle. (x2, y2) is the lower-right corner of rectangle.
 +
 
 +
====void fillbox( int x1, int y1, int x2, int y2 )====
 +
Draws a filled box, (x1, y1) is the upper-left conner of rectangle. (x2, y2) is the lower-right corner of rectangle.
 +
 
 +
====void locate( int x, int y )====
 +
Makes settings for the location of the display cursor<br/>
 +
The range of x is from 1 to 8, the range of y is from 1 to 21 here.
 +
 
 +
====void print( char *str )====
 +
Displays a character string at the current position of the display cursor
 +
 
 +
====void printxy( int x, int y, char *str, int type )====
 +
Displays a character string at the specified position.<br/>
 +
If you set the  type  to 0 then the character string is displayed in normal color. If you set the type  to 1 then the character string is displayed in reverse color.
 +
 
 +
====void printmini( int x, int y, char *str, int type )====
 +
Displays a small font character string at the specified position.
 +
 
 +
The following definitions are declared for type:
 +
 
 +
<table width="300" border="1">
 +
  <tr>
 +
    <td>MINI_OVER</td>
 +
    <td>Overwrite (fill)</td>
 +
  </tr>
 +
  <tr>
 +
    <td>MINI_OR</td>
 +
    <td>OR</td>
 +
  </tr>
 +
  <tr>
 +
    <td>MINI_REV</td>
 +
    <td>Reverse color</td>
 +
  </tr>
 +
  <tr>
 +
    <td>MINI_REVOR</td>
 +
    <td>OR in reverse color</td>
 +
  </tr>
 +
</table>
 +
 
 +
( printmini( 1, 1, “hello”, MINI_OVER ); )
 +
 
 +
====void savedisp( char num )====
 +
Saves a screen image in the system area.<br/>
 +
Num is the ID of the save area. It can only be SAVEPAGE1, SAVEPAGE2 or SAVEPAGE3.<br/>
 +
( savedisp( SAVEPAGE1 ); )
 +
 
 +
====void restdisp( char num )====
 +
Restores a  screen image in the system area.<br/>
 +
Num is the ID of the save area. It can only be SAVEPAGE1, SAVEPAGE2 or SAVEPAGE3.<br/>
 +
( restdisp( SAVEPAGE1 ); )
 +
 
 +
====void popupwin( int n )====
 +
Displays a popup window of the specified size of lines. Also, the inside of the popup window is cleared.<br/>
 +
The range of n is from 1 to 5.
 +
 
 +
====int openfile( const char *name, int mode )====
 +
opens an existing file<br/>
 +
name is the file name ([[#File_name_format|File Name Format]])<br/>
 +
mode specifies the action to open. The following definitions are declared for open mode.
 +
 
 +
<table width="300" border="1">
 +
  <tr>
 +
    <td>OPEN_R</td>
 +
    <td>Read</td>
 +
  </tr>
 +
  <tr>
 +
    <td>OPEN_W</td>
 +
    <td>Write</td>
 +
  </tr>
 +
  <tr>
 +
    <td>OPEN_RW</td>
 +
    <td>Read and write</td>
 +
  </tr>
 +
</table>
 +
If the function succeeds, the return value specifies a file handle. It is greater than or equal to 0.<br/>
 +
If the function fails, the return value is an error code. It is a negative value.
 +
 
 +
====int readfile( int handle, void *buf, int size, int readpos )====
 +
handle is the return value of openfile()<br/>
 +
size is the bytes to be read from the file.<br/>
 +
readpos is the starting position to read. If the  readpos  parameter is -1, this functi on reads data from the position last read ended. If the  readpos  parameter greater than or equal to 0, this function reads data from the position indicated by the  readpos  parameter.<br/>
 +
If the function succeeds, this function returns the number of bytes actually read. It is greater than or equal to 0.<br/>
 +
If the function fails, the return value is an error code. It is a negative value.
 +
 
 +
====int writefile( int handle, void *buf, int size )====
 +
handle is the return value of openfile()<br/>
 +
If the function succeeds, this function returns the number of bytes actually read. It is greater than or equal to 0.<br/>
 +
If the function fails, the return value is an error code. It is a negative value.
 +
 
 +
====int seekfile( int handle, int pos )====
 +
moves the file pointer of an open file<br/>
 +
If the function succeeds, this function returns the number of bytes that can continuously be read. It is greater than or equal to 0.<br/>
 +
If the function fails, the return value is an error code. It is a negative value.
 +
 
 +
====int closefile( int handle )====
 +
closes an open file handle
 +
 
 +
====int getfree( int type, int *freebytes )====
 +
retrieves the size of  the free space, in bytes,  of the specified device<br/>
 +
The following definitions are declared for type.
 +
 
 +
<table width="300" border="1">
 +
  <tr>
 +
    <td>MAIN_FREE</td>
 +
    <td>main memory</td>
 +
  </tr>
 +
  <tr>
 +
    <td>STO_FREE</td>
 +
    <td>storage memory</td>
 +
  </tr>
 +
  <tr>
 +
    <td>SD_FREE</td>
 +
    <td>sd card</td>
 +
   </tr>
 
</table>
 
</table>
 +
( getfree( SD_FREE, &size ); )
 +
 +
freebytes is the pointer to the size of the free space<br/>
 +
If the function succeeds, this function returns 0.<br/>
 +
If the function fails, the return value is an error code. It is a negative value.
 +
 +
====int getsize( int handle )====
 +
retrieves the size, in bytes, of the specified file.
 +
 +
====int createfile( const char *name, int size )====
 +
Creates a file ([[#File_name_format|View File Name Format]])<br/>
 +
If the function succeeds, the return value is 0.<br/>
 +
If the function fails, the return value is an error code. It is a negative value.
 +
 +
====int createdir( const char *name )====
 +
Creates a directory ([[#File_name_format|View File Name Format]])<br/>
 +
If the function succeeds, the return value is 0.<br/>
 +
If the function fails, the return value is an error code. It is a negative value.
 +
 +
====int deletefile( const char *name )====
 +
Delete a file ([[#File_name_format|View File Name Format]])<br/>
 +
If the function succeeds, the return value is 0.<br/>
 +
If the function fails, the return value is an error code. It is a negative value.
 +
 +
====int deletedir( const char *name )====
 +
Delete a directory ([[#File_name_format|View File Name Format]])<br/>
 +
If the function succeeds, the return value is 0.<br/>
 +
If the function fails, the return value is an error code. It is a negative value.
 +
 +
 +
<font color="#FF0000">The following three functions need to used in conjunction, for example, see the example\find.c</font>
 +
 +
====int findfirst( char *pathname, int *handle, char *foundname, int *fileinfo )====
 +
pathname is to find the path ([[#File_name_format|View File Name Format]]), you can use the wildcard "*", "\\\\fls0\\*.txt", 、"\\\\fls0\\*"
 +
 +
File find handle pointed to by handle int (used the findnext and findclose)
 +
 +
foundname will be saved to find the name of the file
 +
 +
The fileinfo maintain to find the file information, it should be a size 6 int array (int the fileinfo [6]), information storage location in the table below
 +
 +
(under construction)...
 +
 +
====int getkey( int *keycode )====
 +
Performs a key wait and returns a value indicating the pressed key
 +
 +
 +
If there are no characters in the key buffer, this func tion waits until a character arrives and then returns immediately.<br/>
 +
Even if the menu key pressed, this function does not return menu key code. The system processes the menu key event.<br/>
 +
Off event, Auto Power Off event, and contrast adjustment are also handled by this function. If an off or Auto Power Off event occurs the application will not be notified. Once the calculator is turned back on control is returned to the GetKey function.
 +
 +
 +
If a character key was pressed, the return value is 1.<br/>
 +
If a control key was pressed, the return value is 0.
 +
 +
([[#Keycode|View key code]])
 +
 +
====int waitkey( void )====
 +
Wait for a key, and return the key code.
 +
 +
It is a simplify of getkey<br/>
 +
([[#Keycode|View key code]])
 +
 +
====int iskeydown( int keycode )====
 +
Checks whether the specified key is pressed.<br/>
 +
The parameter is a key code of the key that you check. <br/>
 +
When you wait events only by this function, the calculator never turns off. Only use this function when you need to wait for key input to continue.<br/>
 +
If the specified key is pressed, the return value is 1.<br/>
 +
If the specified key is not pressed, the return value is 0.<br/>
 +
([[#Keycode|View key code]])
 +
 +
====void sleep( int millsecond )====
 +
Suspends the execution of the current thread for a specified interval.
 +
 +
----
 +
 +
===File name format===
 +
A few examples to illustrate the format of the file name:<br/>
 +
File named 2.txt in the Storage Mem in the root directory is "\\\\fls0\\2.txt"<br/>
 +
File named 2.txt in the directory book in the Storage Mem is "\\\\fls0\\book\\2.txt"<br/>
 +
File named 2.txt in the root directory of the SD card is "\\\\crd0\\2.txt"<br/>
 +
Directory book in SD card is “\\\\crd0\\book”<br/>
 +
 +
In this moment you can’t operate the file in Main Mem
 +
 +
<font color="#FF0000">Note that the filename is case sensitive!</font>
 +
 +
\exemple\FILE.c shows how to operate file
 +
 +
===Keycode===
 +
The following definitions are declared for some common key in fxlib.h
 +
 +
<pre>#define KEY_UP        30018
 +
#define KEY_DOWN      30023
 +
#define KEY_LEFT      30020
 +
#define KEY_RIGHT      30021
 +
#define KEY_EXIT      30002
 +
#define KEY_AC        30015
 +
#define KEY_DEL        30025
 +
#define KEY_EXE        30024
 +
#define KEY_SHIFT      30006
 +
#define KEY_ALPHA      30007
 +
#define KEY_MENU      30003
 +
#define KEY_OPTN      30008
 +
#define KEY_F1        30009
 +
#define KEY_F2        30010
 +
#define KEY_F3        30011</pre>
 +
 +
\example\KEYCODE.c shows how to get the key code of other keys
 +
 +
==Feedback==
 +
If you found bugs, or have any suggestions, questions, you can post it at [http://www.casio-scene.com/showthread.php?1396-WSC-amp-FVM-1-0-Oncalc-C-Compiler-for-fx9860 WSC and FVM Thread].
 +
 +
Special thanks to yangsc825 (testing and recommendations), helder7 (English documentation), Kenneth C. Louden ("Compiler Construction Principles and Practice").
 +
 +
==Changelog==
 +
'''* 2012-07-06 version 1.3'''<br/>
 +
- Add overclocking, RTC functions and perform the function of the FVM program<br/>
 +
(Function names are cpuspeed, readrtc, setrtc, findfirst, findnext, findclose, exefvm, getfvmmsg)<br/>
 +
- Add a bit manipulation functions (for the realization of convenience, make it functional form rather than the operator)<br/>
 +
(Name of the function distribution is bitand, bitor, bitxor, bitnot, shiftl, shiftr)<br/>
 +
- Add the support of the hexadecimal constants<br/>
 +
- Add the font of the IO interface support [[#Use_a_large_font_in_the_IO_interface|See tips]]<br/>
 +
- Optimization of the source code of the FVM (thanks to chuxianbing)<br/>
 +
- Fixed some of the errors of the optimization techniques<br/>
 +
- Canceled automatically initialize the random number seed (time function)<br/>
 +
- Other
 +
 +
'''* 21-06-2012 version 1.2'''<br/>
 +
- Add a simple pre-processor (now the #include)<br/>
 +
- Add file manipulation and plotting functions<br/>
 +
- Add to the bond strength rewind functions<br/>
 +
- Add an optimized technology, test data, maximum speed increased by 10%<br/>
 +
- Fixed some errors in the parameter passing<br/>
 +
- Fix array initialization can only occur once error<br/>
 +
- Fixed the error of the multidimensional array address<br/>
 +
- Others...<br/>
 +
 +
'''* 07-06-2012 version 1.1'''<br/>
 +
- Add most of 9860 to support the standard C function<br/>
 +
- Add a full description of document<br/>
 +
- Add multi-dimensional array initialization<br/>
 +
- Add transfer the character '\ t'<br/>
 +
- Improve the stdio, to support multi-line input, uppercase letters<br/>
 +
- Improve the error message, more friendly<br/>
 +
- Fixed main, not the return 0 mistakes<br/>
 +
- Fixed errors in some of the parameters passed<br/>
 +
- Fixed a global variable, function, character constants can not be the same name error<br/>
 +
- Repair evaluation stack stack stack error<br/>
 +
- Other<br/>
 +
 +
'''* 28-05-2012 version 1.0'''<br/>
 +
- Preview Release

Latest revision as of 19:49, July 7, 2012

Hello !
New version (1.3) will be released in next days, stay tunned.


Contents

Getting Started

Copy the two files inside the bin folder (WSC.g1a, FVM.g1a) to the calculator. In order to edit the source code on calc, you may need to use the EDITv1.51, of course, you can also edit the source code on the computer, it is plain text.

After the installation is complete, the main menu should be as follows:

Wsc-fvm-installed.jpg

Making a hello world

Open the EDIT, the storage Mem (Warning: Do not use the Main Mem) and create a new document.

Wsc-fvm-hello-c.jpg

Enter the text:

void main( )
{
       printf( “Hello World!\n” );
}

(P.S. EDIT could adjust the font size(shift--set up to enter the setting interface), you can see more code on a screen by using the small font, it is recommended to use the small print,the recommended settings below)

Edit-settings.png

The input is completed as follows:

Wsc-fvm-hello-c-code.jpg

To compile the file, exit, enter the WSC, press the F1 (compile) to compile the source code.

Wsc-fvm-compile-file.jpg

If there are no errors, the screen will output “Done”, if there are some errors, you can go back to EDIT to modify. After compiling, enter FVM, press F1(run) to run the bytecode file. the screen will output “hello world”

Wsc-fvm-hello-f.jpgWsc-fvm-run-hello.jpg

WSC Support the C language features

The operator

+ - * / % += -= *= /= < <= > >= == != && || ! != &

note the last ‘&’ is geting address but not bitwise and

Data type

int char float mult-dimensions array pointer(can’t point to array) string constant

Statement

if else while for return break

Notes

C style /*............*/ and C++ style //............

The function

supports recursion, a detailed list of library functions, see library section

Preprocessor

Simple macro replacement (with parameters) a #define, #include (not a real file contains internal use only)

WSC Error reporting

The error reporting of WSC is not perfect,

WSC will displayed the error message when the error is detected, as below:

Wsc-error-reporting.jpg

You can press menu key to exit and go back to modify source code. If you press any other key, the next error message will be displayed.

Note that WSC did not prompt a warning!

Any pointers, arrays are the same in its eyes,

Any assignment between int, char, float will not generate any errors.

A function that return type is not ‘void’ don’t return a value will not generate any errors.

Some differences in the WSC with the standard C

There ary some differences between the WSC and the standard C.

Doesn’t require the function declaration

As long as the function is defined in the file, regardless of location, you can call anywhere.

Only two scopes

The program has only two scopes, global scope and local scope of funcion.

void main()
{
int a;
{
    int a;
}
}

the example program will recerve an error message “Variable ‘a’ redefinition”

int * a, b;

a and b will both be a pointer.(so, it recommended that written int* a, b; but not int *a, b;);

int *p; p++;

The actual value of p will add 4(i.e. sizeof(int) ) in the ANSI C, but WSC will only let p add 1

char s[50] = “asdfjkl”;

This initialization is not yet supported, sample sentence is wrong.

int a[2][2] = { 1, 2, 3, 4 };

This initialization is not yet supported, sample sentence is wrong.

Mult-idimensional array initialization must be grouped properly, such as

int a[2][2] = { {1, 2}, {3, 4} };

the follow is alse correct:

int a[2][2] = { {1}, {3} };

Notice & Tips

int a[10];printf( “%d”, a );

The programmer’s intent is to get the value of a. But as mentioned above, all the pointer are the same in WSC, WSC see a as a pointer to char. so some errors occur.

a correct way as follw:

int a[10]; int t = a; printf( “%d”, t );

char ch;scanf( “%c”, &ch );

For some reasons, the statement is wrong, it is recommended to use getchar();

Enter the uppercase letters

Press F6 in the input interface, than you can enter the uppercase letters

FVM will automatically initialize the random number seed

Don’t require the programmer calling srand();

Enter the uppercase letters

Press F6 in the input interface switch case

Set up multiple strong back

#progma FORCE_BREAK

add the statement above in the source code, then you can hold down F1 + F2 + F6 to force quit the running program.

Use a large font in the IO interface

# progma BIG_FONT

The above statement can be added anywhere in the source code

FVM program size limit

FVM procedure 10kb (not source code, is the f files), if your program is outside this range, use exefvm function

FVM execution environment

The default memory (in this case refers to a static area and stack area) 8kb, you can redefine the following statement

#progma RAM_SIZE 10240 // set to 10240kb = 10kb

The size of the heap area depends on the calculator

If you need exefvm other programs, it is recommended call program RAM_SIZE set

List of library functions

note printf, sprintf, scanf, sscanf are overloading functions, they don’t have variable argument list


stdio.h

int printf( char *format, int val )

int printf( char *format, float val )

int printf( char *format, char* val )

int sprintf( char *buffer, char *format, int val )

int sprintf( char *buffer, char *format, float val )

int sprintf( char *buffer, char *format, char* val )

int scanf( char *format, int *address )

int scanf( char *format, float *address )

int scanf( char *format, char *address )

int sscanf( char *buffer, char *format, int *address )

int sscanf( char *buffer, char *format, int *address )

int sscanf( char *buffer, char *format, float *address )

int getchar( void )

int putchar( int c )

ctype.h

int isalnum( int c )

int isalpha( int c )

int iscntrl( int c )

int isdigit( int c )

int isgraph( int c )

int islower( int c )

int isprint( int c )

int ispunct( int c )

int isspace( int c )

int isupper( int c )

int tolower( int c )

int toupper( int c )

math.h

float acos( float x )

float asin( float x )

float atan( float x )

float atan2( float x, float y )

float cos( float x )

float sin( float x )

float tan( float x )

float cosh( float x )

float sinh( float x )

float tanh( float x )

float log( float x )

float log10( float x )

float modf( float x, float *y )

float pow( float x, float y )

float sqrt( float x )

float ceil( float x )

float fabs( float x )

float floor( float x )

float fmod( float x, float y )

stdlib.h

float atof( char *str )

int atoi( char *str )

int rand( void )

#define RAND_MAX 32767

void srand( int seed )

void *calloc( int nelem, int elsize )

void *malloc( int size )

void *calloc( void *ptr, int size )

void free( void *ptr )

int abs( int x )

string.h

void memcpy( void *p1, void *p2, int n )

char *strcpy( char *s1, char *s2 )

char *strncpy( char *s1, char *s2, int n )

char *strcat( char *s1, char *s2 )

char *strncat( char *s1, char *s2, int n )

int memcmp( void *p1, void *p2, int n )

int strcmp( char *s1, char *s2 )

int strncmp( char *s1, char *s2, int n )

void *memchr( void *p, int c, int n )

char *strchr( char *s, int c )

int strcspn( char *s1, char *s2 )

char *strpbrk( char *s1, char *s2 )

char *strrchr( char *s, int c )

int strspn( char *s1, char *s2 )

char *strstrr( char *s1, char *s2 )

void memset( void *s, int c, int n )

int strlen( char *s )

void *memmove( void *s1, void *s2, int n )

WSC Functions

To use the following functions and definitions, include fxlib.h
All the graphing function draw to VRAM, programmer should use putdisp() to put VRAM to Display Driver.
The range fo abscissa(x) of pointers is from 0 to 127.
The range fo ordinate(y) of pointers is from 0 to 63.

void allclr( void )

Clear the whole area

void areaclr( int x1, int y1, int x2, int y2 )

Clear the specified area
(x1, y1) is the upper-left conner of rectangle. (x2, y2) is the lower-right corner of rectangle.

void arearev( int x1, int y1, int x2, int y2 )

Reverses a specified area
(x1, y1) is the upper-left conner of rectangle. (x2, y2) is the lower-right corner of rectangle.

void putdisp( void )

Put all data from VRAM to Display Driver.

void setpoint( int x, int y, char kind )

Set or erase a dot at the specified position.
If you set point to 1 then the dot is made black. If you set point to 0 then the dot is cleared.

int getpoint( int x, ing y )

Checks a dot at the specified position
If the dot at the specified position is black then this function returns 1. If the dot at the specified position is white then this function returns 0.

void drawline( int x1, int y1, int x2, int y2 )

Draws a line from (x1, y1) to (x2, y2)

void clearline( int x1, int y1, int x2, int y2 )

Draws a white line from (x1, y1) to (x2, y2)

void drawcircle( int x, int y, int r )

Draws a circle at (x,y)

void fillcircle( int x, int y, int r )

Draws a filled circle at (x,y)

void drawbox( int x1, int y1, int x2, int y2 )

Draws a box, (x1, y1) is the upper-left conner of rectangle. (x2, y2) is the lower-right corner of rectangle.

void fillbox( int x1, int y1, int x2, int y2 )

Draws a filled box, (x1, y1) is the upper-left conner of rectangle. (x2, y2) is the lower-right corner of rectangle.

void locate( int x, int y )

Makes settings for the location of the display cursor
The range of x is from 1 to 8, the range of y is from 1 to 21 here.

void print( char *str )

Displays a character string at the current position of the display cursor

void printxy( int x, int y, char *str, int type )

Displays a character string at the specified position.
If you set the type to 0 then the character string is displayed in normal color. If you set the type to 1 then the character string is displayed in reverse color.

void printmini( int x, int y, char *str, int type )

Displays a small font character string at the specified position.

The following definitions are declared for type:

MINI_OVER Overwrite (fill)
MINI_OR OR
MINI_REV Reverse color
MINI_REVOR OR in reverse color

( printmini( 1, 1, “hello”, MINI_OVER ); )

void savedisp( char num )

Saves a screen image in the system area.
Num is the ID of the save area. It can only be SAVEPAGE1, SAVEPAGE2 or SAVEPAGE3.
( savedisp( SAVEPAGE1 ); )

void restdisp( char num )

Restores a screen image in the system area.
Num is the ID of the save area. It can only be SAVEPAGE1, SAVEPAGE2 or SAVEPAGE3.
( restdisp( SAVEPAGE1 ); )

void popupwin( int n )

Displays a popup window of the specified size of lines. Also, the inside of the popup window is cleared.
The range of n is from 1 to 5.

int openfile( const char *name, int mode )

opens an existing file
name is the file name (File Name Format)
mode specifies the action to open. The following definitions are declared for open mode.

OPEN_R Read
OPEN_W Write
OPEN_RW Read and write

If the function succeeds, the return value specifies a file handle. It is greater than or equal to 0.
If the function fails, the return value is an error code. It is a negative value.

int readfile( int handle, void *buf, int size, int readpos )

handle is the return value of openfile()
size is the bytes to be read from the file.
readpos is the starting position to read. If the readpos parameter is -1, this functi on reads data from the position last read ended. If the readpos parameter greater than or equal to 0, this function reads data from the position indicated by the readpos parameter.
If the function succeeds, this function returns the number of bytes actually read. It is greater than or equal to 0.
If the function fails, the return value is an error code. It is a negative value.

int writefile( int handle, void *buf, int size )

handle is the return value of openfile()
If the function succeeds, this function returns the number of bytes actually read. It is greater than or equal to 0.
If the function fails, the return value is an error code. It is a negative value.

int seekfile( int handle, int pos )

moves the file pointer of an open file
If the function succeeds, this function returns the number of bytes that can continuously be read. It is greater than or equal to 0.
If the function fails, the return value is an error code. It is a negative value.

int closefile( int handle )

closes an open file handle

int getfree( int type, int *freebytes )

retrieves the size of the free space, in bytes, of the specified device
The following definitions are declared for type.

MAIN_FREE main memory
STO_FREE storage memory
SD_FREE sd card

( getfree( SD_FREE, &size ); )

freebytes is the pointer to the size of the free space
If the function succeeds, this function returns 0.
If the function fails, the return value is an error code. It is a negative value.

int getsize( int handle )

retrieves the size, in bytes, of the specified file.

int createfile( const char *name, int size )

Creates a file (View File Name Format)
If the function succeeds, the return value is 0.
If the function fails, the return value is an error code. It is a negative value.

int createdir( const char *name )

Creates a directory (View File Name Format)
If the function succeeds, the return value is 0.
If the function fails, the return value is an error code. It is a negative value.

int deletefile( const char *name )

Delete a file (View File Name Format)
If the function succeeds, the return value is 0.
If the function fails, the return value is an error code. It is a negative value.

int deletedir( const char *name )

Delete a directory (View File Name Format)
If the function succeeds, the return value is 0.
If the function fails, the return value is an error code. It is a negative value.


The following three functions need to used in conjunction, for example, see the example\find.c

int findfirst( char *pathname, int *handle, char *foundname, int *fileinfo )

pathname is to find the path (View File Name Format), you can use the wildcard "*", "\\\\fls0\\*.txt", 、"\\\\fls0\\*"

File find handle pointed to by handle int (used the findnext and findclose)

foundname will be saved to find the name of the file

The fileinfo maintain to find the file information, it should be a size 6 int array (int the fileinfo [6]), information storage location in the table below

(under construction)...

int getkey( int *keycode )

Performs a key wait and returns a value indicating the pressed key


If there are no characters in the key buffer, this func tion waits until a character arrives and then returns immediately.
Even if the menu key pressed, this function does not return menu key code. The system processes the menu key event.
Off event, Auto Power Off event, and contrast adjustment are also handled by this function. If an off or Auto Power Off event occurs the application will not be notified. Once the calculator is turned back on control is returned to the GetKey function.


If a character key was pressed, the return value is 1.
If a control key was pressed, the return value is 0.

(View key code)

int waitkey( void )

Wait for a key, and return the key code.

It is a simplify of getkey
(View key code)

int iskeydown( int keycode )

Checks whether the specified key is pressed.
The parameter is a key code of the key that you check.
When you wait events only by this function, the calculator never turns off. Only use this function when you need to wait for key input to continue.
If the specified key is pressed, the return value is 1.
If the specified key is not pressed, the return value is 0.
(View key code)

void sleep( int millsecond )

Suspends the execution of the current thread for a specified interval.


File name format

A few examples to illustrate the format of the file name:
File named 2.txt in the Storage Mem in the root directory is "\\\\fls0\\2.txt"
File named 2.txt in the directory book in the Storage Mem is "\\\\fls0\\book\\2.txt"
File named 2.txt in the root directory of the SD card is "\\\\crd0\\2.txt"
Directory book in SD card is “\\\\crd0\\book”

In this moment you can’t operate the file in Main Mem

Note that the filename is case sensitive!

\exemple\FILE.c shows how to operate file

Keycode

The following definitions are declared for some common key in fxlib.h

#define KEY_UP         30018
#define KEY_DOWN       30023
#define KEY_LEFT       30020
#define KEY_RIGHT      30021
#define KEY_EXIT       30002
#define KEY_AC         30015
#define KEY_DEL        30025
#define KEY_EXE        30024
#define KEY_SHIFT      30006
#define KEY_ALPHA      30007
#define KEY_MENU       30003
#define KEY_OPTN       30008
#define KEY_F1         30009
#define KEY_F2         30010
#define KEY_F3         30011

\example\KEYCODE.c shows how to get the key code of other keys

Feedback

If you found bugs, or have any suggestions, questions, you can post it at WSC and FVM Thread.

Special thanks to yangsc825 (testing and recommendations), helder7 (English documentation), Kenneth C. Louden ("Compiler Construction Principles and Practice").

Changelog

* 2012-07-06 version 1.3
- Add overclocking, RTC functions and perform the function of the FVM program
(Function names are cpuspeed, readrtc, setrtc, findfirst, findnext, findclose, exefvm, getfvmmsg)
- Add a bit manipulation functions (for the realization of convenience, make it functional form rather than the operator)
(Name of the function distribution is bitand, bitor, bitxor, bitnot, shiftl, shiftr)
- Add the support of the hexadecimal constants
- Add the font of the IO interface support See tips
- Optimization of the source code of the FVM (thanks to chuxianbing)
- Fixed some of the errors of the optimization techniques
- Canceled automatically initialize the random number seed (time function)
- Other

* 21-06-2012 version 1.2
- Add a simple pre-processor (now the #include)
- Add file manipulation and plotting functions
- Add to the bond strength rewind functions
- Add an optimized technology, test data, maximum speed increased by 10%
- Fixed some errors in the parameter passing
- Fix array initialization can only occur once error
- Fixed the error of the multidimensional array address
- Others...

* 07-06-2012 version 1.1
- Add most of 9860 to support the standard C function
- Add a full description of document
- Add multi-dimensional array initialization
- Add transfer the character '\ t'
- Improve the stdio, to support multi-line input, uppercase letters
- Improve the error message, more friendly
- Fixed main, not the return 0 mistakes
- Fixed errors in some of the parameters passed
- Fixed a global variable, function, character constants can not be the same name error
- Repair evaluation stack stack stack error
- Other

* 28-05-2012 version 1.0
- Preview Release