e-Gadget - プログラム関数電卓 Inside Casio Basic

Inside Casio Basic

 Inside Casio Basic - Index
< English | 日本語

Content is checked by fx-5800P, fx-9860G Sreis (OS 2 or later) and fxCG10/20/50 (OS 2 or later).
This is on-going project, any changes may be made.



Undocumented Casio Basic
 - Display Area UNDOCUMENTED
Variety of Coordinate Systems for Graphics UNDOCUMENTED
Control of Internal Cursor Row UNDOCUMENTED



Command Reference

*1) Models: "5800" (fx-5800P), "9860" (fx-9860G Series OS 2.00 or later) and "CG" (fx-CG10/20/50).
 
Basic Operation CommandsModels *1)
  (Substitution)5800, 9860, CG

" " (Text Display)5800, 9860, CG
 (Display & Pause)5800, 9860, CG
? (Input)5800
?→ (Input)5800, 9860, CG
 
I/O CommandsModels *1)
Getkey5800, 9860, CG
Locate5800, 9860, CG
Menu9860, CG
 
Program CommandsModels *1)
If... Then... [Else...] IfEnd5800, 9860, CG
For... To... [Step...] Next5800, 9860, CG
While... WhileEnd5800, 9860, CG
Do... LpWhile5800, 9860, CG
 
Program Control CommandsModels *1)
Break5800, 9860, CG
Return5800, 9860, CG
Stop5800, 9860, CG
Prog5800, 9860, CG
 
Jump CommandsModels *1)
Goto... Lbl5800, 9860, CG
5800, 9860, CG
Isz5800, 9860, CG
Dsz5800, 9860, CG
  
Relational OperatorsModels *1)
=, ≠, <, >, ≤, 5800, 9860, CG
 
Logical OperatorsModels *1)
And, Or, Not5800, 9860, CG
Nor9860, CG
 
Description CodesModels *1)
: (Multi-statement code)5800, 9860, CG
' (Comment Text Delimiter)9860, CG
  
VariablesModels *1)
Alphabets (Capital Letters)5800, 9860, CG
Array: Dim, Z[ ]5800
Matrix: Dim, Mat, Det, Trn, Fill, ...5800, 9860, CG
List: Dim, List, Fill, Min, Max, ...5800, 9860, CG
 
Display Setup (text)Models *1)
Cls (Text)5800
ClrText (Text)9860, CG
Eng9860, CG
EngOn, EngOff5800, 9860, CG
Norm5800, 9860, CG
Sci5800, 9860, CG
Fix5800, 9860, CG
Deg, Rad, Gra5800, 9860, CG
°, r (rad), g (gra)DMS5800, 9860, CG
f, p, n, μ, m5800, 9860, CG
k, M, G, T, P, E5800, 9860, CG
  
StringsModels *1)
Str, StrJoin, StrLen, StrCmp5800, 9860, CG
StrSrc, StrLeft, StrRight, StrMid5800, 9860, CG
ExpStr, Exp, StrUpr, StrLwr5800, 9860, CG
StrInv, StrShift, StrTorate, \, +5800, 9860, CG
 
Graphics SetupModels *1)
ClrGraph9860, CG
ViewWindow9860, CG
StoV-Win9860, CG
RclV-Win9860, CG
Xmin, Xmax, Xdot, Xscl9860, CG
Ymin, Ymax, Yscl9860, CG
 AxesOn, AxesOff9860, CG
AxesScaleCG
 GridOn, GridOff9860, CG
GridLineCG
 LabelOn, LabelOff9860, CG
CoordOn, CoordOff9860, CG
S-L-Normal, S-L-Thick, S-L-Dot, S-L-Broken9860, CG
S-L-ThinCG
Plot/Line-ColorCG
  
Graphics Sketch CommandsModels *1)
Cls (Graphics)9860, CG
ClrGraph9860, CG
Text9860, CG
PxlOn9860, CG
PxlOff9860, CG
PxlChg9860, CG
PxlTest(9860, CG
Plot9860, CG
Line9860, CG
PlotOn9860, CG
PlotOff9860, CG
F-Line9860, CG
Vertical9860, CG
Horizontal9860, CG
Circle9860, CG
SketchNormal, SketchThick, SketchDot, SketchBroken9860, CG
SketchThinCG
StoPict9860, CG
RclPict9860, CG
Black, Blue, Red, Magenta, Green, Cyan, YellowCG
 
 


Copyright (C) 2013 Krtyski / egadget.blog.fc2.com  All Rights Reserved.



続きを読む

テーマ : プログラム関数電卓
ジャンル : コンピュータ

? (Input)

 → (Input)
<Inside Casio Basic> <C.Basic>

This content is checked by fx-5800P, fx-9860G Series (OS 2 or later) and fx-CG10/20/50.
This is on-going project, any changes may be made.


Model

fx-5800P


Syntax

  1. ?V (V: variable)
  2. "<S>"?V (V: variable, <S>: String)


Key Press

fx-5800P: [FUNCTION][3](3:PROG) [3](1:?)



Function

Key input to variable V.


Description
  1. When ?V is excuted, variable name V and ? are displayed as V? in very left. Value of variable V is displayed in very right in new line. Then ready for key input. Key input number and press [EXE], the numbere is input to variable V and the nunber is displayed in very right of new line. If just [EXE] is pressed, the variable still has same value.. 
  2. When "STRING"?V is executed, STRING? is displayed in very left. Value of variable V is displayed in very right in new line. Then ready for key input. 

Note
  1. ? command only can be used on fx-5800P. This command cannot be used on fx-9860G Series or fx-CG10/20/15.


See also: ?→

Copyright (C) 2013 Krtyski / egadget.blog.fc2.com  All Rights Reserved.

テーマ : プログラム関数電卓
ジャンル : コンピュータ

◢ (Display & Pause) Command

  (Display & Pause) Command
<Inside Casio Basic> <C.Basic>

This content is checked by fx-5800P, fx-9860G Sreis (OS 2 or later) and fx-CG10/20/50.
This is on-going project, any changes may be made.


Model

fx-5800P, fx-9860GII and fx-CG10/20/50


Syntax

<variable / calculation expression>

<statement / display command>


Key Press

fx-5800P: [SHIFT][x2]

fx-9860GII: [SHIFT][VARS](PRGM)[F5]()
fx-CG10/20/50: [SHIFT][VARS](PRGM)[F5]()


Function
  1. Display value or result of <variable / calculate expresison> and interrupt program until [EXE] key is pressed.
  2. Right after <statement / display command> is processed, interrupt program until [EXE] key is pressed.

Description


  1. The command interrupted by  command can be a text display and a graphics display command.
  2. UNDOCUMENTED During program is interrupted by the  command, with fx-5800P small icon Disp is indicated above its display area, and with fx-9860GII or fx-CG10/20/50 "- DISP -" is indicated on current internal cursor row in display area of text screen.
Note
  1. UNDOCUMENTED User should understand that "- DISP - " is indicated in current internal cursor row to avoid unexpected display trouble in some cases. As an example see following code;   

[fx-9860GII and fx-CG20/10]
'<Sample Code 1>
ClrText
Locate 1,1,"1ST ROW"

its display results in ...

1ST ROW


Adding command.after Locate ...

[fx-9860GII and fx-CG10/20/50]
'<Sample Code 2>
ClrText
Locate 1,1,"1ST ROW"



then the result comes to ...

- DISP -

The "- DISP -" string is over-writes the whole 1st row. In order to display "1ST ROW" text, following code may help;

[fx-9860GII and fx-CG10/20/50]
ClrText
""
Locate 1,1,"1ST ROW"


which result in

1ST ROW
                 - DISP -

or

[fx-9860GII and fx-CG10/20/50]
ClrText
Locate 1,2,"1ST ROW"


which result in
                 - DISP -
1ST ROW


On the other hand, 
fx-5800P Casio Basic does not result in the same problem ...

[fx-5800P]
Cls
Locate 1,1,"1ST ROW"


The result is ...

1ST ROW

There is no harmful - DISP - indication.



See also: Contorl of Internal Cursor Row, " " (Text Display)  

Copyright (C) 2013 Krtyski / egadget.blog.fc2.com  All Rights Reserved.

テーマ : プログラム関数電卓
ジャンル : コンピュータ

" " (Text Display) Command

 " " (Text Display)
<Inside Casio Basic> <C.Basic>

This content is checked by fx-5800P, fx-9860G Series (OS 2 or later) and fx-CG10/20/50.
This is on-going project, any changes may be made.


Model

fx-5800P, fx-9860GII and fx-CG10/20/50


Syntax

"
<string>"


Key Press

fx-5800P: [ALPHA][SqrRoot]

fx-9860GII: [ALPHA][EXP]
fx-CG10/20/50: [ALPHA][EXP]


Function
  1. Display string or character(s) between " and ".

Description
  1. <string> (string or charactoer) can be combination of  an alphabet, a charactor, a command, a mathimatical function or any simbol.
  2. After display of <string> by "<string>" code, internal cursor row for input or output moves down to the next row.
  3. UNDOCUMENTED The internal cursor row is reset back to top row after text clear command (Cls on fx-5800P or ClrText on fx-9860GII or fx-CG10/20/50) runs.
  4. When the internal cursor row comes to bottom row [4th row from top (fx-5800P) or 7th row from top (fx-9860GII and fx-CG10/20/50)], the internal cursor row stay at the botom row even "<string>" runs.

Note

UNDOCUMENTED Detailed behavior of the " " output command on fx-9860GII or fx-CG10/20/50 is deferent from on fx-5800P. Following sample code gives deferent result;   
Locate 5,1,"-RIGHT-"
"LEFT"


[fx-5800P] The output result is...

LEFT-RIGHT-

This result tells you that the "LEFT" code over-writes 4 column.

[fx9860GII or fx-CG10/20/50] The output result is...


LEFT

This result tells you that the "LEFT" code over-writes whole row.


Copyright (C) 2013 Krtyski / egadget.blog.fc2.com  All Rights Reserved.

テーマ : プログラム関数電卓
ジャンル : コンピュータ

→ (Substitution)

 → (Substitution)
<Inside Casio Basic> <C.Basic>

This content is checked by fx-5800P, fx-9860G Series (OS 2 or later) and fx-CG10/20/50.
This is on-going project, any changes may be made.


Model

fx-5800P, fx-9860GII and fx-CG10/20/50


Syntax

<A>V


Key Press

fx-5800P: [FUNCTION][3](3:PROG) [2](2:→)

fx-5800P: UNDOCUMENTED [SHIFT][RCL] 
fx-9860GII: [→]
fx-CG10/20/50: [→]


Function

Substitute value of <A> to variable V.


Description
  1. <A> can be a number, a variable or an expression which returns value.

Note
  1. UNDOCUMENTED After press [SHIFT][RCL] keys to input , Alpha Mode is automatically set. User does not need to press [ALPHA] key for a variable input. 


See also: ?→

Copyright (C) 2013 Krtyski / egadget.blog.fc2.com  All Rights Reserved.

テーマ : プログラム関数電卓
ジャンル : コンピュータ

Dislay Area

 Display Area
<Inside Casio Basic> <C.Basic>

This content is checked by fx-9860GII (OS 2.04) and fxCG20 (OS 2.00).
This is on-going project and any changes may be made.


Model

fx-5800P, fx-9860GII and fx-CG20/10


Description
  1. fx-9860GII or fx-CG20/10 has Text Screen and Graphics Screen. Those 2 screens are switched to each other, and text and graphcs cannot be displayed in a single screen.
  2. Text Screen of fx-5800P has 4 lines and 16 columns display area. Text Screen of fx-9860GII and fx-CG20/10 has 7 lines and 21 columns display area.
  3. UNDOCUMENTED Graphics Screen of fx-9860GII has 127 pixel x 63 pixel display area. Graphics Screen of fx-CG20/10 has 379 pixel x 187 pixel display area. 

Note
  1. UNDOCUMENTED For correct bitmap output with ViewWindow setup, user should be aware of the correct pixel numbers of graphics area. For example a bit map output should have problem if ViewWindow 0,126,0,0,63,0 is set instead of correct setup ViewWindow 0,127,0,0,62,0, See below in details;  
Example 1-1: Correct bitmap output as expected in code (fx-9860GII)
CodesResult
ClrGraph
CoordOff
GridOff
AxesOff
LabelOff
ViewWindow 0,126,0,0,62,0
For 0→Y To 62
SketchDot F-Line 0,Y,126-MOD(Y,2),Y
Next
DLINE2s

Example 1-2: Unexpected horizontal line appares with wrong ViewWindow seetup (fx-9860GII)
CodesResult
ClrGraph
CoordOff
GridOff
AxesOff
LabelOff
ViewWindow 0,126,0,0,63,0
For 0→Y To 63
SketchDot F-Line 0,Y,126-MOD(Y,2),Y
Next
DLINE3.1s
There actually are 63 pixels in vertical direction, but 64 dots is rogically defined in vertical. Psition of all plots are calculated and rounded to be one-to-one correspondence with LCD pixels. That's why the unexpected horizontal line appears. 
 
  
With fx-CG20/10, ViewWindow 0,126,0,0,62,0 and ViewWindow 0,126,0,0,63,0 gives similar but different results.
 
Example 2-1: Correct bitmap output as expected in code (fx-CG-20/10)
CodesResult
ClrGraph
CoordOff
GridOff
AxesOff
LabelOff
ViewWindow 0,126,0,0,62,0
For 0→Y To 62
SketchDot F-Line 0,Y,126-MOD(Y,2),Y
Next
DispOK_cg20

Example 2-2: Unexpected horizontal line appares with wrong ViewWindow setup (fx-CG20/10)
CodesResult
ClrGraph
CoordOff
GridOff
AxesOff
LabelOff
ViewWindow 0,126,0,0,63,0
For 0→Y To 63
SketchDot F-Line 0,Y,126-MOD(Y,2),Y
Next
DispProblem_cg20
Logically it's same result but fxpCG20/10 has different number (187) of pixels, so the result in detailed is not same.




See also: ClrGraph, ViewWindow


Copyright (C) 2013 - 2016 Krtyski / egadget.blog.fc2.com  All Rights Reserved.


テーマ : プログラム関数電卓
ジャンル : コンピュータ

Vriety of Coordinate Systems for Graphics

 Variety of Coordinate Systems for Graphics
<Inside Casio Basic> <C.Basic>

This content is checked by fx-9860GII (OS 2.04) and fxCG20 (OS 2.00).
This is on-going project and any changes may be made.


Model

fx-9860GII and fxCG20/10


Function
  1. Casio Basic provides variety of coordinate systems; Device Coordinate System and Logical Coordinate Systems.
  2. Device Coordinate System directly corresponds to pixeles of LCD. Left top pixel is pointed by cordinate (1,1) which means (first Row, first Column). Row is in vertical direction and only discrete (natural) number 1, 2, 3, ...  is avaiable. Column is in horizontal direction and also only discrete (natural) number is available. With fx-9860GII maximum Row coordinante value is 63 and maximum Column coordinate value is 127. With fx-CG20 max Row value is 187 and max Column vaue is 379. Out of the min - max range or fractional number is set as parameter, Casio Basic returns ERROR.
  3. Device Coordinate System is automatically applied only at usage of Text, PlxOn, PxlOff, PxlChg and PixlTest commands. User cannot expressly set Device Coordinate System.
  4. There are 2 deferent ways to setup Logical Coordinate System, a Default Logical Coordinate System and ViewWindow Logical Coordinate System.
  5. UNDOCUMENTED Default Logical Coordinate System is automatically chosen when ClrGraph command runs. This coordinate system can be expressed by Xmin = -6.3, Xmax = 6.3, Xscl = 0.1, Ymin = -3.1, Ymax = 3.1 and Yscl = 0.1, where those 6 variables are automatically set with those above values. In stead of ClrGraph, following codes gives same resut; Cls:-6.3->Xmin:6.3->Xmax:-3.1->Ymin:3.1->Ymax (where -> is substitution command).
  6. Using ViewWindow command any coordinate system can be defined freely. We call this here as ViewWindow Coordinate System. In stead of ViewWindow command, setting 6 variables (Xmin, Xmax, Xscl, Ymin, Ymax and Yscl) results in same setup; 


See also: ClrGraph, ViewWindow, Xmin, Xmax, Xscl, Ymin, Ymax, Yscl


Copyright (C) 2013 - 2016 Krtyski / egadget.blog.fc2.com  All Rights Reserved.


テーマ : プログラム関数電卓
ジャンル : コンピュータ

Control of Internal Cursor Row

 Control of Internal Cursor Row
<Inside Casio Basic> <C.Basic>

This content is checked by fx-5800P, fx-9860GII (OS 2.04) and fx-CG20 (OS 2.00).
This is on-going project, and any changes may be made.


Model

fx-5800P, fx-9860GII and fx-CG20


Function
 UNDOCUMENTED
  1. When ? (input), " " (output) or  (output of value and pause) runs, input and output row is automaticallly controled. The input and output row start with top row of LCD and incremented at the time one of those commands is carried out. Once the row comes to bottom (4th row with fx-5800P or 7th row with fx-9860GII and fx-CG20/10) the row stays at the bottom.
  2. Only after 'clear text' command Cls (fx-5800P) or ClrText (fx-9860GII and fx-CG20/10) runs, the cursor row is reset back to top row. 

Note
  1. Run "" (no charactor within " ") once, then the internal cursor moves down to the next row.


See also: ?, " "
, Cls, ClrText

Copyright (C) 2013 - 2016 Krtyski / egadget.blog.fc2.com  All Rights Reserved.

テーマ : プログラム関数電卓
ジャンル : コンピュータ

Cls Command

 Cls
<Inside Casio Basic> <C.Basic>

This content is checked by fx-5800P, fx-9860GII (OS 2.04) and fx-CG20 (OS 2.00).
This is on-going project, and any changes may be made.


Model

fx-5800P, fx-9860GII and fx-CG20/10


Syntax

Cls


Key Press

- fx-5800P: [FUNCTION] [3] (3:PROG) [▼] [▼] [5] (5:Cls)
- fx-9860GII, fx-CG20/10: [SHIFT] [F4] (Sketch) [F1] (Cls)


Function

- fx-5800P: Clear text display.
- fx-9860GII and fx-CG-20/10:Clear graphics display.


Description
  1. UNDOCUMENTED Cls and ClrGraph on fx-9860GII and fx-CG-20/10 clear graphics display. ClrGraph also changes coordinate system into Default Logical Coordinate System and modify dot pitch (Xdot) to 0.1.
  2. Cls simply just clears graphics.
  3. ClrText on fx-9860GII and fx-CG20/10 clears text display.
  4. UNDOCUMENTED With fx-5800P, Cls resets internal cursor row to top row, for details see Control of Internal Cursor Row.
  5. UNDOCUMENTED With fx-9860GII and fx-CG20/10, ClrText resets internal cursor row to top row, for details see Control of Internal Cursor Row.

Note

Cls command on fx-5800P is not compatible on fx-9860GII and fx-CG20/10.




See also:
 ClrText, ClrGraph, Control of Internal Cursor Row

Copyright (C) 2013 - 2016 Krtyski / egadget.blog.fc2.com  All Rights Reserved.


テーマ : プログラム関数電卓
ジャンル : コンピュータ

PlotOff Command

 PlotOff
<Inside Casio Basic> <C.Basic>

This content is checked by fx-5800P, fx-9860GII (OS 2.04) and fx-CG20 (OS 2.00).
This is on-going project, any changes may be made.


Model

fx-9860GII and fx-CG20/10


Syntax

PlotOff
 <X>,<Y>


Key Press

[SHIFT] [F4] (Sketch) [F6] (⊳) [F1] (PLOT) [F3] (Pl⋅Off)


Function

Clear a pixel corresponding to coordinate (<X>, <Y>).


Description
  1. Exact position of the coordinate on LCD is based on currently setup coordinate system, Default Logical or ViewWindow Coordinate System.
  2. <X> and <Y> can be a number, a variable or an expression which returns value.
  3. UNDOCUMENTED After procssing PlotOff, value of <X> and <Y> are automatically substituted into variable X and Y subsequently. See following sample code;
ClrGraph
CoordOff
GridOff
AxesOff
LabelOff
ViewWindow 0,126,00,62,0
F-Line 0,0,62,62
For 0->I To 62
PlotOff I,I
Text 1,1,X
Text 18,1,Y

Next


Note
  1. Pay attention to value of variables X and Y which are changed by this command in your program, see  Desc 3.



See also: PlotOn, PlotChg, ViewWindow, ClrGraph

Copyright (C) 2013 - 2016 Krtyski / egadget.blog.fc2.com  All Rights Reserved.

テーマ : プログラム関数電卓
ジャンル : コンピュータ

最新記事
検索フォーム
最新コメント
カテゴリ
C# (3)
Online Counter
現在の閲覧者数:
プロフィール

やす (Krtyski)

Author:やす (Krtyski)
since Oct 30, 2013


プログラム電卓は、プログラムを作って、使ってナンボ!

プログラム電卓を実際に使って気づいたこと、自作プログラム、電卓での Casio Basic, C.Basic そして Casio Python プログラミングについて書いています。

なお管理人はカシオ計算機の関係者ではありません。いつでもどこでもプログラミングができるプログラム電卓が好きな1ユーザーです。


写真: 「4駆で泥んこ遊び@オックスフォード郊外」

リンク
月別アーカイブ
Sitemap

全ての記事を表示する

ブロとも申請フォーム

この人とブロともになる

QRコード
QR