Casio FX-870P
Manual (Japanese with English commentary): CasioVX-4-Manual-Peter-Rost.pdf
Programming in C
Navigation
S (red), F.COM (blue) |
Enter C programming mode |
S |
Source - edit code |
R |
Run - compile and run code |
| Arrow keys |
Select program |
(after program run) S, M or type edit |
Edit code |
S (red), MEMO (line) |
Go to line |
Types
char |
8 bit |
short |
16 bit |
int |
16 bit |
unsigned |
16 bit |
long |
32 bit |
float |
32 bit |
double |
64 bit |
structs or unions are not supported.
Flow control
if (C)
expr;
if (C) {
expr;
expr;
}
if (C) {
expr;
} else {
expr;
}
while (C) {
expr;
}
do {
expr;
} while(C);
for (A; B;C; C)I) {
expr;
}
goto LABEL;
LABEL;
switch/case are not supported.
Functions
Entry function:
main() {
expr;
}
Custom function:
int foo(buf,x,y)
char buf[];
int x;
int y;
{
int i;
expr;
}
Variables need to be declared first then assigned.
Functions are declared in pre-ANSI style. Inner variables need to be defined at body top.
int getchar() |
|
int getc(FILE) / int fgetc(FILE) |
For |
int putchar(char) |
|
int putc(char, FILE) / int fputc(char, FILE) |
For There is also printer(?): |
char *gets(char *) (unsafe) |
|
char fgets(char *, int buflen, FILE) |
|
int puts(char *) |
|
int fputs(char *,FILE) |
|
printf(format, args, ...) |
|
fpritf(FILE, format, args, ...) |
|
sprintf(char *buf, format, args, ...) |
|
int scanf(format, args, ...) |
|
int fscanf(FILE, format, args, ...) |
|
int sscanf(char *buf, format, args, ...) |
|
int fflush(FILE) |
|
int inport(int n) |
|
outport(int n, int i) |
|
clearerr(FILE in) |
|
breakpt() |
|
exit() / abort() |
|
char *malloc(unsigned size) |
|
char *calloc(unsigned n,unsigned size) |
|
int free(char *) |
|
int strlen(char *) |
|
char *strcpy(char *dest, char *src) |
|
char *?strcat(char *dest, char *src) |
|
int strcmp(char *, char *) |
|
char strchr(char *,char) |
|
int abs(int) |
|
double sin(double) [cos, tan, asin, acos, atan, sinh, cosh, tanh, asinh, acosh, atanh] |
|
double pow(double, double) |
|
double sqrt(double) |
|
double exp(double) |
|
double log(double) / double log10(double) |
|
angle(unsigned) |
mode for |
beep(unsigned) |
|
clrscr() |
|
gotoxy(unsigned x, unsigned y) |
|
