WSC and FVM

From Casio Universal Wiki
Revision as of 13:01, June 7, 2012 by Helder7 (talk | contribs) (Getting Started)
Jump to: navigation, search

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” );

}

(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)

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 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.

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

WSC Support the C language features

The operator

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

Note that the last '&' is the address instead of a bitwise

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)

Statement

If the else the while for the return the break

Notes

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

Function call

Support recursive.

WSC Error reporting

Wsc error reporting is not perfect, calculator small screen is not easy to display all error messages.

Wsc will be displayed on the screen when the error is detected, the error message, as shown:

Wsc-error-reporting.jpg

Then press the menu key you can exit to modify the other key to display the next error message.

Note that WSC did not prompt a warning!

Any pointers, arrays, in its eyes are the same, any assignment.

int, a char, float, assignment, will not generate any warning messages.