Array
Array
This content is checked by fx-9860GII (OS 2.04).
This is on-going project, any changes may be made.
Model
fx-9860G Series
Syntax
<natural number>→Dim A (Allocate array)
A[<index>] (an Array)
0→Dim A (Release array)
Key Press
Dim [F3](CMD) --> [down]/[up] --> [9](9:Dim)
Function
- When allocated n elements for the array, user can use A[1], A[2], ... A[n].
Description
- A - Z (capital letters) can be used for the array variables.
- An array provided by fx-5800P Casio Basic is more convenient than matrix, that's why C.Basic provides array.
- The array must be initialzed (allocated in memory), and cleared (reased from memory) in a program.
- <index> should be natural number, 0 (zero) cannot be used.
- 100->Dim Z is same as [100,1]->Mat Z, Z[100] is same as Mat Z[100,1] and 0->Dim Z is same as ClrMat Z.
Sample program, display of Fibonacci sequence;
50→Dim A
1→A[1]:1→A[2]
For 3→I To 50
A[I-2]+A{I-1]→A[I]
Locate 1,1,"I="
Locate 3,1,I
Locate 1,2,"A[I]="
Locate 6,2,A[I]
Getkey1
Next
0→Dim A
Copyright (C) 2013 - 2016 Krtyski / egadget.blog.fc2.com All Rights Reserved.
- 関連記事
-
-
Initialize & Substitute to Matrix (C.Basic) 2014/08/01
-
Allocates Matrix (C.Basic) 2014/08/01
-
Array 2014/08/01
-
'/ Comment-out only for Original Casio Basic 2014/08/01
-
GoSub Command 2014/08/01
-