Jump to content



Photo
- - - - -

Adding To Lists


  • Please log in to reply
7 replies to this topic

#1 s509

s509

    Newbie

  • Members
  • Pip
  • 26 posts

  • Calculators:
    my head
    FX 1.0
    cfx 9850

Posted 27 April 2005 - 01:19 PM

i'm writing a program to keep all of my grades in and i want to add to a list in a certain file from inside the program. i would sure thank all the help i can get.

#2 Marco

Marco

    Casio Freak

  • Members
  • PipPipPipPip
  • 185 posts
  • Location:Dresden, Germany

  • Calculators:
    Casio CFX 9850G (broken),
    Casio CFX 9850GB,
    Casio Algebra FX 2.0 Plus

Posted 27 April 2005 - 06:21 PM

There are only two ways to create a list from inside a program:

1.
{1,2,3,...}->List 1
This one is static as the number of elements is fixed.

2.
Seq(f(var),var,start,end,step)->List 1
This is flexible in the number of elements (the list will recieve (end-start)/step+1), and you also can initialise them with f(var), where var is the running variable (similar to a FOR - loop).

For example when you have some elements in List 2 and you want to add 5, you can do it this way:

List 2->List 3
Dim List2->A
Seq(0,X,1,A+5,1)->List 2
For A->A To 0 Step -1 Do
List 3[A]->List 2[A]
Next

Btw. I'd suggest you to store not any grade you get but maybe make a list with six entries (grade 1..6)and store how often you got it. E.g. 3x1, 7x2, 2x3 would be {3,7,2,0,0,0} and so on.

#3 Overlord

Overlord

    Casio Technician

  • Moderator
  • PipPipPipPipPipPip
  • 355 posts
  • Gender:Male
  • Location:Brussels - Belgium
  • Interests:Math Researcher

  • Calculators:
    My head - C300 OS 3.00 - G100 Rom 1.02 - G65 - G60 - G25

Posted 27 April 2005 - 06:52 PM

You can also do 12->Dim List 1 to create a list 1 with 12 elements

#4 caspro

caspro

    Casio Freak

  • Members
  • PipPipPipPip
  • 216 posts

Posted 18 May 2005 - 04:35 PM

Here's another couple of methods for appending an item to a list
that you might find interesting.

To append 77 to List 1 (matrix method):

Trn Augment(List->Mat(List 1),[7->Mat A
Mat->List(Mat A,1)->List 1

If you prefer not to use up matrix memory then there is the
sequence method which runs slightly slower.

To append 77 to List 1 (sequence method):

1+Dim List 1
Seq(List 1×- (X=Ans, X, 1, Ans, 1->List 1
77->List 1[Ans

The above is an excerpt taken from:
http://members.lycos...html/lists.html

---
Roy F.A. Maclean, rfam AT lycos.co.uk
http://members.lycos.co.uk/rfam

#5 s509

s509

    Newbie

  • Members
  • Pip
  • 26 posts

  • Calculators:
    my head
    FX 1.0
    cfx 9850

Posted 19 May 2005 - 02:51 AM

What is "Dim"

#6 huhn_m

huhn_m

    Casio Maniac

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1957 posts
  • Gender:Male
  • Location:Germany / Dresden
  • Interests:Assembler(!!!)
    Computers and Programming
    Operating Systems
    Programmable Calculators
    Maths and everything arround it

  • Calculators:
    FX-82SX / AFX 2.0+ (ROM 1.03) / FX 1.0+ (ROM 1.03)

Posted 19 May 2005 - 10:50 AM

:huh: :unsure:

it is the command that defines / returns the size of a List / Array:

Return size of List:

Dim List 1->A

and size of array:

Dim Array A->List 1

and set size of list:

5->Dim List 1

and size of array

{5,5}->Dim Array A

Cu huhn

#7 visualbasic22

visualbasic22

    Newbie

  • Members
  • Pip
  • 8 posts

  • Calculators:
    Casio fx-9750G Plus

Posted 13 June 2005 - 10:19 PM

I seen the option your looking for but I don't have my calculator now. I think it was shift - setup/menu then look for selecting file number. You can change list files in your program with this menu.

#8 visualbasic22

visualbasic22

    Newbie

  • Members
  • Pip
  • 8 posts

  • Calculators:
    Casio fx-9750G Plus

Posted 15 June 2005 - 09:39 PM

His question was how do you change list file numbers in a program. In the program editor press shift then press the menu/setup button then press F6 till you see list then select file file number you want to change too. Later in program do this again to change to another file list.

It will look this in program

File1
File3




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users