Skip to main content

Casio FX-870P

casio-FX-879P.jpg

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

Types

char
8 bit
short
16 bit
int
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) {
  expr;
}
goto LABEL;

LABEL;

switch/case are not supported.

Functions

Entry function:

main() {
  expr;
}

Variables need to be declared first then assigned.

int getchar()

int getc(FILE)int fgetc(FILE)

For stdin file: extern FILE *stdin;

int putchar(char)

int putc(char, FILE) / int fputc(char, FILE)

For stdout file: extern FILE *stdout;

There is also printer(?): extern File *stdprn

char *gets(char *) (unsafe)
char msg[8];
gets(msg);
pringf("Hello: %s",msg);
char fgets(char *, int buflen, FILE)
extern FILE *stdin;
main() {
  char msg[8];
  fgets(msg,8,stdin);
  pringf("Hello: %s",msg);
}
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)