Inside Casio Basic

 Inside Casio Basic - Index
< English | 日本語

Content is checked by fx-5800P, fx-9860GII (OS 2.04) and fxCG20/10 (OS 2.00).
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 "CG20" (fx-CG10/20).
 
Basic Operation CommandsModels *1)
  (Substitution)5800, 9860, CG20

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


Copyright (C) 2013 - 2016 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-9860GII (OS 2.04) and fx-CG20 (OS 2.00).
This is on-going project, any changes may be made.


Model

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


Syntax

<variable / calculation expression>

<statement / display command>


Key Press

fx-5800P: [SHIFT][x2]

fx-9860GII: [SHIFT][VARS](PRGM)[F5]()
fx-CG20/10: [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-CG20 "- 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-CG20/10]
'<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-CG20/10]
ClrText
""
Locate 1,1,"1ST ROW"


which result in

1ST ROW
                 - DISP -

or

[fx-9860GII and fx-CG20/10]
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 - 2016 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-9860GII (OS 2.04) and fx-CG20 (OS 2.00).
This is on-going project, any changes may be made.


Model

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


Syntax

"
<string>"


Key Press

fx-5800P: [ALPHA][SqrRoot]

fx-9860GII: [ALPHA][EXP]
fx-CG20/10: [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-CG20/10) 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-CG20/10)], 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-CG20/10 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-CG20/10] The output result is...


LEFT

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


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

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

→ (Substitution)

 → (Substitution)
<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-5800P, fx-9860GII and fx-CG20/10


Syntax

<A>V


Key Press

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

fx-5800P: UNDOCUMENTED [SHIFT][RCL] 
fx-9860GII: [→]
fx-CG20/10: [→]


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 - 2016 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
LabelOO
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
LabelOO
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; 

Note
  1. Running ViewWindow 1,127,Xscl,63,1,Yscl (fx-9860GII) or ViewWindow 1,379,Xscl,187,1,Yscl (fx-CG20/10), you can set Coordinate System which is similar to Device Coordinate System. But note this coordinate system allow user to set fractional number as coordinate parameter.
  2. Default Logical Coordinate System can be set by ViewWindow -6.3,6.3,0.1,-3.1,3.1,0.1.
  3. UNDOCUMENTED When user write wrong setup by ViewWindow 0,126,0,0,63,0 instead of correct setup ViewWindow 0,127,0,0,62,0, unexpected graphics ouput may appears. See below sample code in details;  
Example 1-1: Correct result as expcted in code (fx-9860GII)
CodesResult
ClGraph
CoordOff
GridOff
AxesOff
LabelOO
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 setup (fx-9860GII)
CodesResult
ClGraph
CoordOff
GridOff
AxesOff
LabelOO
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 result 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, 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.

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

PlotOn Command

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

PlotOn
<X>,<Y>


Key Press

[SHIFT] [F4] (Sketch) [F6] (⊳) [F1] (PLOT) [F2] (Pl⋅On)


Function

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


Description
  1. Exact position of the coordinate on LCD is based on currently setup of coordinate system, Default Logical or ViewWindow Cordinate System.
  2. <X> and <Y> can be a number, a variable or an expression which returns value.
  3. UNDOCUMENTED After procssing PlotOn, 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,0,0,62,0
For 0->I To 62
PlotOn I,I
Text 1,1,X
Text 18,1,Y

Next

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


See also: PlotOff, PlotChg, ViewWindow, ClrGraph

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

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

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

やす (Krtyski)

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


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

実際に触って気づいたこと、自作プログラム、電卓プログラミングについて書いています

おもしろい・役に立つならクリックしてください。励みになります。
にほんブログ村 IT技術ブログ 開発言語へ
にほんブログ村


人気ブログランキングへ


FC2ブログランキングへ


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

リンク
月別アーカイブ
Sitemap

全ての記事を表示する

RSSリンクの表示
最新トラックバック
ブロとも申請フォーム

この人とブロともになる

QRコード
QR