Page 2 - CONTENTS
2 CONTENTS 1 Unit Configuration .................................................................................................. 5 1.1 General Guide ................................................................................................. 5 1.2 Operational Functions ................
Page 5 - Unit Configuration
5 1 Unit Configuration 1.1 General Guide Power Switch Shift Key Volatile Shift Key Numeric Keys Decimal Key Arithmetic Operator Keys Execute Key Parentheses Keys Answer Key Engineering Key Alphabet Keys Space Key CAPS Key Cursor Keys Insert/Delete Keys Break Key Backspace/Clear Line Key Clear Screen...
Page 6 - Operational Functions
6 1.2 Operational Functions Power Switch Slide up to switch power ON and down to switch power OFF. Shift Key ( S ) Used to enter BASIC commands and symbols noted above the keys of the keyboard. Each press of this key causes the symbol “[S]” to switch on and off on the display. Throughout this manual...
Page 10 - Lower Case Mode; Operation
10 1.4 Keyboard A look at the keyboard of the unit reveals characters and symbols located above the keys. These are accessed using the CAPS and Shift keys. 1.4.1 Keytop Functions Normal Mode In this mode, each key inputs the characters, symbols, or commands noted on the keys themselves. (this status...
Page 11 - EXAMPLE
11 1.4.2 Functions Noted Above the Keys The BASIC one-key commands, and the symbols and commands noted above the keys are entered when the corresponding keys are pressed following the Shift key. Note, however, that pressing the numeric keys ( 0 - 9 ) after Shift in the CAL mode executes the BASIC pr...
Page 12 - Display Characters; Character Code Table
12 1.5.3 Screen Editor Any program lines or data included on the virtual screen can be edited. First the portion of the program or data is brought onto the actual screen, and then the cursor is located at the position to be edited 1.5.4 Display Contrast The display may appear dark or dim depending u...
Page 13 - Battery Replacement; S Y S T E M *
13 Characters which cannot be displayed using keyboard input can be displayed using the CHR$ function. 1.7 Power Supply This unit is equipped with a main power supply (four AA Alkaline batteries) and a backup power supply (one CR2032 lithium battery). Batteries should be replaced whenever the displa...
Page 14 - erase all programs and data
14 Note: This hardware test will erase all programs and data stored in the unit. Selecting one of the options of the self-test menu will allow following tests 0. Test of the Read Only Memory, computing check sum and XOR check 1. Test of the symbol displays, outside pixels, uneven pixels, even pixels...
Page 15 - Fundamental Operation; is used instead of the = key, operation is identical to that used in a; Formula Storage Function; KEY INPUT; CAL
15 2 Fundamental Operation This section covers the various modes available with the computer using a series of simple examples. These procedures should be mastered before attempting more complex operations. 2.1 CAL Mode The CAL mode is in effect each time the power of the unit is switched ON. Arithm...
Page 17 - PROGRAM INPUT
17 2.4 C Mode The C mode is used for the creation, execution and editing of C programs. The C mode can be entered from another mode by pressing MENU 3 . EXAMPLE : Create and execute a program that prints HELLO. PROGRAM INPUT MENU 3 2 < C > F 0 1 2 3 4 5 6 7 8 9 51113B F0>Run/Load/Source You...
Page 18 - Calculation Function; Manual Calculation Preparations
18 3 Calculation Function This section covers fundamental arithmetic calculations and function calculations, which are performed manually. 3.1 Manual Calculation Preparations Switch the power of the unit ON CAPS . S . BASIC . DEG . RAD . GRA . _ The display illustrated above appears when...
Page 19 - OPERATION
19 EXAMPLE: 33 x 5 + 16 = 181 For the sake of the example, the above calculation will be performed with the value 33 mistakenly entered as 34. 34 * 5 + 16 . . 34*5+16 186 . . (Move cursor to position for correction.) 34*5+16 186 3 33*5+16 186 . . (Re-execute calculation.) 33*5+16 181 Cor...
Page 20 - This process performed first; Priority Sequence
20 EXAMPLE 3: (4.5 x 10 75 ) x (-2.3 x 10 -78 ) = -0.01035 OPERATION: 4.5 IE 75 * - 2.3 IE - 78 . . 4.5E75*-2.3E-78 -0.01035 Exponents are entered by pressing the IE key (or the alphabetic E key) before entering the value. EXAMPLE 4: (23 + 456) x 567 = 271593 OPERATION: 23 + 456 . . * 567 . . ...
Page 21 - ANGLE0
21 3.1 Scientific Calculations The scientific functions can be used either with BASIC programs or for manual calculations. For the sake of the explanation, all the examples here will cover only manual calculations. 3.1.1 Trigonometric and Inverse Trigonometric Functions SIN (Sine), COS (Cosine), TAN...
Page 22 - Formula Storage Function; Sample Application
22 4 Formula Storage Function The formula Storage function is very useful when performing repeat calculations. Three different keys are used when working with the formula Storage function. IN key……. Stores presently displayed formula. OUT key…… Displays formula stored in memory. CALC key…. Assigns v...
Page 23 - Utilization for Preparing Tables
23 Y= 3.397 X?15 Y=3.313 X?_ 22 . . X?15 Y=3.313 X?22 Y= 3.180 . . Y=3.313 X?22 Y= 3.180 X?_ 27 . . X?22 Y= 3.180 X?27 Y= 3.056 . . Y= 3.180 X?27 Y= 3.056 X?_ 31 . . X?27 Y= 3.056 X?31 Y= 2.940 BRK Y= 3.056 X?31 Y= 2.940 _ The CALC key can be used in place of the . . key to perform repea...
Page 26 - BASIC Programming; Features of BASIC; Standard mathematical functions
26 5 BASIC Programming Standard BASIC is employed as the programming language for this unit, and this section covers application of the BASIC language. 5.1 Features of BASIC 1. BASIC is much easier to use than other programming languages such as FORTRAN, making it suitable even for novices. 2. Writi...
Page 27 - BASIC Program Configuration; Input sequence
27 5.2 BASIC Program Configuration 5.2.1 BASIC Program Format The following is a typical BASIC program, which calculates the volume of a cylinder. EXAMPLE: 10 REM CYLINDER 20 R=15 30 INPUT “H=”;H 40 V=PI*R^2*H 50 PRINT “V=”;V 60 END As can be seen, the BASIC program is actually a collection of lines...
Page 28 - BASIC Program Input; ONE KEY INPUT
28 5.3 BASIC Program Input 5.3.1 Preparation First, switch the power of the computer ON. At this time, the display should appear as illustrated below. CAPS . S . BASIC . DEG . RAD . GRA . _ This is the CAL mode, so the operation MENU 2 should first be performed to allow input of BASIC pr...
Page 30 - Displaying from line 110 to line 160 on the virtual screen.; Changes within a program following the EDIT command; Shift EDIT
30 Again, the . . key must be pressed to store the corrected line into memory after changes are made. Changes within a program already input The LIST command displays the program stored in the current program area form beginning to end. Shift LIST . . 10 REM CYLINDER 20 R=15 30 INPUT “H=”;H 40 V...
Page 31 - BASIC Program Execution; Using Shift (program area) in CAL mode; Shift RUN
31 . . . . (displays line 30 to 60) 30 INPUT “H=”;H 40 V=PI+R^2*H 50 PRINT “V=”;V 60 END Here, a correction will be made in line 40. . . (Displays line 40 to 60, line 40 at the upper line of the display) . . (Enables program editing) 40 V=PI+R^2*H . . . . . . . . . . . . . . . ...
Page 33 - data item
33 of the data read from line 180, followed by the square root and cube root of the sum. Program execution is terminated when the operator enters a zero. 10 S=0 20 RESTORE 30 INPUT N 40 IF N>5 THEN N=5 50 IF N=0 THEN GOTO 130 60 FOR I=1 TO N 70 READ X 80 S=S+X 90 NEXT I 100 GOSUB 140 110 PRINT S;...
Page 35 - Labels
35 Note: GOSUB routines can also be used to branch to other program areas, as in GOSUB #3 (branches to program area 3). Note, however, that a return must be made back to original program area using the RETURN command before an END command is executed. 5.5.10 Labels You have the possibility to assign...
Page 37 - Constants and Variables
37 Logical Operators The operands of logical operations are truncated to integers and the operation is performed bit-by-bit to obtain the result. X Y X AND Y X OR Y X XOR Y NOT X NOT Y 0 0 0 0 0 1 1 0 1 0 1 1 1 0 1 0 0 1 1 0 1 1 1 1 1 0 0 0 String Operators Strings may be concatenated using a + sign...
Page 38 - Numeric Variables; PROGRAM; String Variables; Assigns “AD” to string variable A$; Array Variables
38 5.7.2 Variables Numeric Variables The following shows the numeric variables included in the sample program on page 33: PROGRAM 20 R=15 30 INPUT “H=”;H 40 V=PI*R^2*H NUMERIC VARIABLES R H V Numeric variables are so named because their contents are handled as numbers. Numeric variable names can be ...
Page 39 - Declare array variable A for storage of 9 numeric data items.
39 EXAMPLE : Declare array variable A for storage of 9 numeric data items. 10 DIM A (8) Note: a declared value of 8 makes possible to store 9 data items. EXAMPLE: Recall value stored in element 4 of array A Y=A(4) Or X=4:Y=A(X) The value that specifies an element in an array (4 above) is called a su...
Page 40 - Variable types; Numeric array; Variable names
40 5.7.3 Summary Variable types The three following types of variable are available for use with this unit. 1. Numeric variables (up to 12-digit mantissa) A, a, NUMBER, POINTS 2. String variables (up to 255 characters) A$, STRING$ 3. Array variables Numeric array A(10), XX(3,3,3) String array A$(10)...
Page 41 - BASIC Command Reference
41 5.8 BASIC Command Reference 5.8.1 Format elements The method for entering statements is explained below. • Words in bold type are command or functions, and they must be entered as shown. • Braces indicate that one of the parameters enclosed must be specified. • Commas contained in braces must be ...
Page 42 - The following operations and commands cannot be executed when a
42 5.8.2 Manual Commands PASS PURPOSE : Specifies or cancels a password FORMAT : PASS “password” String expression EXAMPLE : PASS”TEXT” PARAMETERS : 1. Registering a single password makes it the password for all BASIC program areas (P0-P9) and for C language and Assembler program areas (F0-F9). 2. T...
Page 43 - with the parameters entered.; without changing memory mapping.
43 CLEAR PURPOSE : Clears all variables and determines the memory mapping in accordance with the parameters entered. FORMAT : CLEAR [ [strings area size] [ , assembler area size , variables area size ] ] Numeric expression Numeric expression Numeric expression EXAMPLE : CLEAR CLEAR 400 CLEAR 4096,51...
Page 48 - : The argument is the number of 10
48 5.8.3 Fundamental Commands END PURPOSE : Terminates program execution. EXPLANATION : 1. Terminates program execution, and the computer stands for command input 2. Closes all files that are open 3. Variables and arrays are not cleared. 4. Any number of END statements can be used in a single progra...
Page 53 - IF – THEN IF THEN – ELSE IF – THEN ELSE – ELSE –
53 IF-THEN-ELSE / IF-GOTO-ELSE PURPOSE : Executes the THEN statement or GOTO statement when the specified condition is met. The ELSE statement is executed when the specified condition is not met. FORMAT : THEN statement statement IF condition [ : statement ELSE [ : statement Numeric expression GOTO ...
Page 55 - variable on the left side.
55 7. The control variable retains the value that exceeds the final value (and terminates the loop) when loop execution is complete. With the loop FOR I=3 to 10 STEP 3 for example, the value of control variable I is 12 when execution of the loop is complete. 8. Jumping out of a FOR – NEXT loop is al...
Page 56 - : Holds data for Reading by the READ statement.
56 DATA PURPOSE : Holds data for Reading by the READ statement. FORMAT : DATA [ data ] [ , [ data ] ] * Constant Constant EXAMPLE : DATA 10,5,8,3 DATA CAT,DOG,LION PARAMETERS : 1. Data: String constants or numeric constants 2. String constants: Quotation marks are not required unless the string cont...
Page 57 - : Returns the absolute value of the argument.; angle specification; the range of 0
57 5.8.4 Mathematical Functions ABS PURPOSE : Returns the absolute value of the argument. FORMAT : ABS (argument) Numeric expression The parenthesis enclosing the argument can be omitted when the argument is a numeric value or variable. EXAMPLE : ABS (-1.1) PARAMETERS : argument : numeric expression...
Page 58 - : Returns the value of the cosine of the argument.; Radians
58 ASN PURPOSE : Returns the angle value for which sine (angle value) = argument. FORMAT : ASN (argument) Numeric expression The parenthesis enclosing the argument can be omitted when the argument is a numeric value or variable. EXAMPLE : ASN (0.1) PARAMETERS : argument must be within the [-1 , +1] ...
Page 59 - : Returns the cubic root of the argument.; : Returns the value of e
59 CUR PURPOSE : Returns the cubic root of the argument. FORMAT : CUR (argument) Numeric expression The parenthesis enclosing the argument can be omitted when the argument is a numeric value or variable. EXAMPLE : Y = CUR (X) PARAMETERS : argument: numeric expression. SEE : SQR EXP PURPOSE : Returns...
Page 60 - : Returns the integer part of the argument.; : Returns the fractional part of the argument.; The mathematical formula for reverse hyperbolic cosine is :
60 FIX PURPOSE : Returns the integer part of the argument. FORMAT : FIX (argument) Numeric expression The parenthesis enclosing the argument can be omitted when the argument is a numeric value or variable. EXAMPLE : FIX (-1.5) PARAMETERS : argument : numeric expression SEE : INT, FRAC FRAC PURPOSE :...
Page 61 - The mathematical formula for reverse hyperbolic sine is :; The mathematical formula for reverse hyperbolic tangent is :; The mathematical formula for hyperbolic cosine is :
61 HYPASN PURPOSE : Returns the value for which hyperbolic sine (value) = parameter. FORMAT : HYPASN (argument) Numeric expression The parenthesis enclosing the argument can be omitted when the argument is a numeric value or variable. EXAMPLE : HYPASN (-150) PARAMETERS : argument must be within the ...
Page 62 - : Returns the value of the hyperbolic sine of the argument.; The mathematical formula for hyperbolic sine is :; The mathematical formula for hyperbolic tangent is :
62 HYPSIN PURPOSE : Returns the value of the hyperbolic sine of the argument. FORMAT : HYPSIN (argument) Numeric expression The parenthesis enclosing the argument can be omitted when the argument is a numeric value or variable. EXAMPLE : HYPSIN (1.5) PARAMETERS : argument must be within the [-230.25...
Page 63 - : Returns the common logarithm of the argument.; : Returns the natural logarithm of the parameter; : Returns the combination nCr for the values of n and r.
63 LOG PURPOSE : Returns the common logarithm of the argument. FORMAT : LOG (argument) Numeric expression The parenthesis enclosing the argument can be omitted when the argument is a numeric value or variable. EXAMPLE : LOG (7922) PARAMETERS : argument must be within the ]10 -100 , 10 100 [ range. E...
Page 65 - : Returns a random value in the range of 0 to 1.; angle; assigned to variable Y
65 RAN# PURPOSE : Returns a random value in the range of 0 to 1. FORMAT : RAN# (argument) Numeric expression The parenthesis enclosing the argument can be omitted when the argument is a numeric value or variable. EXAMPLE : RAN# * 10 PARAMETERS : argument : numeric expression EXPLANATION : 1. Returns...
Page 66 - : Rounds the argument at the specified digit.; : Returns a value of -1 when the argument is negative, 0 when the
66 ROUND PURPOSE : Rounds the argument at the specified digit. FORMAT : ROUND ( argument , digit ) Numeric expression Numeric expression The parenthesis enclosing the argument can be omitted when the argument is a numeric value or variable. EXAMPLE : ROUND (A, -3) PARAMETERS : 1. argument : numeric ...
Page 67 - : Returns the square root of the argument.; : Returns the value of the tangent of the argument.
67 SQR PURPOSE : Returns the square root of the argument. FORMAT : SQR (argument) Numeric expression The parenthesis enclosing the argument can be omitted when the argument is a numeric value or variable. EXAMPLE : SQR (4) PARAMETERS : argument must be positive. SEE : CUR TAN PURPOSE : Returns the v...
Page 69 - Pressing; : Argument: numeric expression truncated to an integer in the
69 &H PURPOSE : Converts the 1 through 4-digit hexadecimal value following &H to a decimal value. FORMAT : &H argument Hexadecimal value EXAMPLE : A = &HAF PARAMETERS : Hexadecimal value in the [0, FFFF] range. EXPLANATION : 1. The hexadecimal value is expressed using values 0 to 9, ...
Page 70 - greater than the number of characters of the string.
70 LEFT$ PURPOSE : Returns a substring of a specified length counting from the left of a string. FORMAT : LEFT$ ( string , number of characters ) String expression Numeric expression EXAMPLE : LEFT$ (“ABCDEF”, 3) PARAMETERS : 1. String: string expression 2. Number of characters: numeric expression t...
Page 71 - position; the length of the string.
71 MID$ PURPOSE : Returns a substring of a specified length from a specified position within a string. FORMAT : MID$ ( string , position [ , number of characters ] ) String expression Numeric expression Numeric expression EXAMPLE : MID$ (A$, 5, 3) PARAMETERS : 1. String: string expression 2. Positio...
Page 72 - values are preceded by a minus sign; when the leading character is non-numeric.; and returns their results.
72 STR$ PURPOSE : Converts the argument (numeric value or numeric expression value) to a string. FORMAT : STR$ (argument) Numeric expression EXAMPLE : STR$ (123), STR$ (255+3) PARAMETERS : Argument: numeric expression EXPLANATION : 1. Converts decimal values specified in the argument to strings. 2. ...
Page 74 - : Returns the status of a pixel
74 POINT PURPOSE : Returns the status of a pixel FORMAT : POINT ( x , y ) Numeric expression Numeric expression EXAMPLE : POINT(50,50) PARAMETERS : (x, y) is a graphic coordinate. 1. x should be in the [0 , 191] range. 2. y should be in the [0 , 63] range. EXPLANATION : Value returned is 1 if the pi...
Page 75 - BASIC Commands Index
75 5.1 BASIC Commands Index &H 69 LOAD# ABS 57 LOCATE ANGLE 57 LOG, LN 63 ASC 68 LPRINT ASN, ACS, ATN 58 MID$ 71 BEEP NCR 63 CHR$ NEW [ALL] 42 CLEAR 43 NEW# CLOSE NPR 64 CLS ON ERROR GOTO CUR 59 ON GOSUB 52 DATA 56 ON GOTO 51 DEFSEG OPEN DEG 68 PASS 42 DIM PAUSE DMS$ 68 PEEK EDIT 46 PI 64 END 48...
Page 76 - C Programming; The Basics of C; Early history of C
76 6 C Programming 6.1 The Basics of C 6.1.1 C and the other programming languages Early history of C C is a programming language that incorporates such concepts as module programming and structural syntax along the lines of ALGOL. Another well-known offshoot of ALGOL is PASCAL, and forebears of C a...
Page 77 - Learning about C with your pocket computer; With most computers, C acts as a
77 6. Pointer control Unlike the memory addresses used in FORTRAN, COBOL and BASIC, C employs a pointer to indicate memory locations. 7. Efficient use of memory Memory and data management functions, as well as programs are very compact, for more efficient memory utilization. Thanks to this, C gives ...
Page 78 - About the C interpreter; compiling; About the C editor; MENU
78 The few differences between the Casio interpreted C language and an ANSI standard compiled C will be highlighted in this manual 6.2 C Program Input 6.2.1 About the C Interpreter and Editor The unit provides you with both a C interpreter and editor. The interpreter is used to execute programs. The...
Page 79 - Entering the editor
79 3. Pressing the key 3 will lead to the C sub-menu allowing writing, compiling, running and editing programs in C language. . 3 . < C > F 0 1 2 3 4 5 6 7 8 9 51113B F1>Run/Load/Source You can use the cursor keys to select the program area 0 - 9 The S key allows to start writing the so...
Page 81 - Editing a C program; SRCH; Jumping to a specific line; Shift LINE 3
81 Editing a C program Once in the editor, there are two modes for editing: the INSERT mode and the OVERWRITE mode. Switch between these two modes by pressing the INS key. The INSERT mode is automatically specified when you enter the editor. The insert mode is indicated by a cursor thet looks like “...
Page 82 - C Program Execution; trace function
82 } ↵ < 3> Note that the line number displayed at the lower right is the one requested. Now, let’s execute our program. 6.1 C Program Execution 6.1.1 To execute a program You can exit the editor by pressing the SUB MENU key, which will go back to the C mode menu. Shift SUB MENU < C > F ...
Page 84 - Introduction to C
84 To interrupt execution of the TRACE mode Lets run again the program in TRACE mode: . R U N . . >run (F1-5) printf(“HELLO¥n”); Break?_ 1. You can press T or . . to execute the line and carry on the TRACE mode. 2. You can press BRK to exit the program, but stay in TRACE mode. This is useful ...
Page 86 - Making your program easy to read; We could have just as easily written and input it as:; Creating a program to output numeric values; argument; argument
86 Making your program easy to read You have probably noticed by now that we have been writing and editing our C programs in a certain format. The previous program was written and entered as: main() { printf(“How are you?¥n”); printf(“Fine,thank you¥n”); } We could have just as easily written and in...
Page 87 - Integer notation in C
87 Note that there is a direct relationship with • the 1 st % construction and the 2 nd argument • the 2 nd % construction and the 3 rd argument • the 3 rd % construction and the 4 th argument. printf(“D=%d H=%x F=%f¥n”65,65,65.0); You just have to be careful to ensure that the proper % construction...
Page 88 - Declaring variable types
88 The following results would be displayed: . R U N . . >run D=65 O=101 H=41 C=A >_ 6.2.2 Variable types and operations Declaring variable types With C programs, you have to declare the type of data that will be assigned to each variable before you can use the variable. The following statem...
Page 89 - R U N; Using arrays
89 } The first four operations are addition, subtraction, multiplication and division. The value for “e” will be the modulus (remainder) of 49 divided by 12. When you execute the program, the display should appear as follows: . R U N . . >run 61 37 588 4 1 >_ The following statement in the f...
Page 90 - Entering a single character from the keyboard
90 6.2.3 Entering characters and values Entering a single character from the keyboard Here we will create a program that outputs a character and its corresponding character code in hexadecimal format. If you press the key for the letter “B”, for example, the format will be: Char=B Hex=0x42 The stand...
Page 91 - Entering Values
91 Entering Values Now, let’s try a program that calculates the sine and cosine of values that you enter from the keyboard. Since we can be expecting decimal values for input and output, we will be defining the variable as floating-point. The program to accomplish this task would appear as follows: ...
Page 92 - – 4ac
92 6.2.4 Using selection statements Using the “if” selection statement You can use the “if” statement to tell the computer to shift the flow of control if certain conditions are met. The “if” statement has two basic formats. 1. if (condition) statement. Here, the statement is executed if the conditi...
Page 93 - Relational operators; Operator Example Meaning
93 /* Quadratic equation */ /* #include <stdio.h> */ /* #include <math.h> */ main() { double a,b,c,D,q,r; scanf(“%lf %lf %lf“,&a,&b,&c); D=b*b-4.0*a*c; if (d>=0) { q=(-b+sqrt(D))/a/2.0; r=(-b-sqrt(D))/a/2.0; printf(“%If, %If¥n“,q,r); } else { r=sqrt(-D)/a/2.0; q=-b/a/2.0; ...
Page 94 - Using the “while” loop; The following shows the program that produces such result.
94 6.2.5 Using loops Using the “while” loop The “while” loop makes it possible to repeat execution of statements until a specific condition is met. The format of the “while” loop is as follows: while (condition) Statement The “while” loop first executes the condition. If the condition is met (true, ...
Page 96 - the first pass of the loop.
96 Using the “do – while” loop The “do – while” loop is another method that you can use for repeat execution. The format of the “do – while” loop is as follows: do Statement while (condition); Unlike the “while” loop, the “do – while” loop executes the statement first and then checks whether or not ...
Page 98 - Nested loops
98 Nested loops The term nested loop means simply “loops inside of loops”. To better understand how nested loops work, let’s have a look at a very short, simple representative program. /* nested loops example */ /* #include <stdio.h> */ main() { float a[3][3]; int i,j; for (i=0; i<3; i++) f...
Page 102 - Local variables
102 6.1 Constants and Variables 6.1.1 Local variables and global variables Local variables A local variable is one that is declared within a function for use within that particular function only. Since such variables are local, you can use the same variable name in multiple functions without any pro...
Page 103 - Pointers and variable storage locations; Entering values; “ would for example produce the result “=54”.
103 Here, variable “i” is declared outside of any function, so “i” will be treated as a global variable. Consequently, it will retain its current value regardless of whether execution is in main() or pr(). In this program, variable “i” is assigned a value by the “for” loop in main(), and then the va...
Page 104 - Assigning variable names and function names; name may be a reserved word.; Character constants
104 Finally, the printf() statement displays the value of “xy” which is the result, no matter which arithmetic operation is performed. 6.1.3 Data types and lengths The following table shows the data types and their respective lengths for the interpreter. These are almost identical on all computers, ...
Page 106 - double; String constants; auto
106 Floating-point constants and double precision floating-point constants Decimal values can be defined as float type or double type constants using the format shown below. Exponents are indicated by the letter “E” or “e”. Example: 3.1416 -1.4141 1.0e-4 1.23456E5 The following shows the ranges of f...
Page 107 - Arrays; is equal to; Initializing arrays
107 Note: The interpreter does not allow declaring a local “auto” variable within the code of a function. func(a) double a; { int i,j,x; float fx,fy; long lx,ly; for(i=0;i<5;i++) { … } } func(a) double a; { int i,j,x; long lx,ly; for(i=0;i<5;i++) { float fx,fy; … } } func(a) double a; { int i,...
Page 108 - Execution of this program will produce the following result:; Precedence
108 You can also use a pointer within a character string to isolate single characters from the string. /* Pointer example */ /* #include <stdio.h> */ main() { char *p; p=”Casio”; printf(“%c %s¥n”,*p,p); } Execution of this program will produce the following result: C Casio >_ This is becaus...
Page 111 - C Command Reference
111 6.3 C Command Reference 6.3.1 Manual Commands RUN PURPOSE : Execution of a C program. EXAMPLE : RUN run RUN>”PRN:” PARAMETERS : You can specify the output console being the printer instead of the screen. EXPLANATION : Execution starts at the beginning of the main() function of the program cur...
Page 114 - back to the “do” loop to execute the statement again.
114 while() PURPOSE : Executes repeatedly a statement as long as the specified condition is true (not zero). . FORMAT : while (condition) statement PARAMETERS : Condition can be any variable or expression that will be considered true if not 0. EXPLANATION : 1. The “while” loop first executes the con...
Page 117 - : Branches unconditionally to a specified destination label.; FORMAT; : label is the name of a label defined within the same function.; EXPLANATION
117 goto PURPOSE : Branches unconditionally to a specified destination label. FORMAT : goto label; PARAMETERS : label is the name of a label defined within the same function. EXPLANATION : 1. the goto statement and label concept are similar to the ones used in BASIC. 2. a label is defined writing an...
Page 126 - C Commands Index
126 6.4 C Commands Index abort 112 if 113 abs 118 inp acos, asin, atan 118 inport acosh, asinh, atanh 118 int angle 118 line 125 auto linec 125 beep log, log10 120 break 115 long breakpt 112 main call malloc calloc out case 116 outport char pow 121 clearerr printf clrscr 125 putc const putchar conti...