# Prizm Program Help

9 replies to this topic

### #1 joshp689

joshp689

Newbie

• Members
• 4 posts

• Calculators:
Prizm

Posted 20 April 2016 - 04:33 AM

Hello,

This is my first post and i need help.

I trying to write a program on my Prizm. I am exposed to c++ and python with a hint r. I think my problem is mostly a syntax error, but here we go.

here is my code so far.

```Lbl 0
"1 for option 1"
"2 for option 2"
"3 for option 3"
"4 for option 4"
"5 for option 5"

?->A
A=1 =>GoTo 1
A=2 =>GoTo 2
A=3 =>GoTo 3
A=4 =>GoTo 4
A=5 =>GoTo 5

Lbl 1
ClrText
"option 1"
?->B
math function on B
output number(idk how to do the output symbol)
GoTo 0

Lbl 2
ClrText
"option 1"
?->B
math function on B
output number(idk how to do the output symbol)
GoTo 0

Lbl 3
ClrText
"option 1"
?->B
math function on B
output number(idk how to do the output symbol)
GoTo 0

Lbl 4
ClrText
"option 1"
?->B
math function on B
output number(idk how to do the output symbol)
GoTo 0

Lbl 1
ClrText
"option 1"
?->B
math function on B
output number(idk how to do the output symbol)
GoTo 0
```

This post was in the wrong section so i moved it.

So my issue is now that I can jump to the correct section and ask for a new input how would I do a math function on "B", then output the results?

### #2 pan.gejt

pan.gejt

Casio Freak

• Members
• 195 posts
• Gender:Male
• Location:CZ

• Calculators:
.

Posted 20 April 2016 - 02:51 PM

My solution

Lbl 5:ClrText:"INPUT OPTION 1-5"?->O:
O≠1=>Goto 1:ClrText:"OPTION 1":
"B"?->B:"R="▲ (triangle - shift+prgm and F5)

Lbl 1:O≠2=>Goto 2:ClrText:"OPTION 2":
"B"?->B:"R="▲ (triangle - shift+prgm and F5)

Lbl 2:O≠3=>Goto 3:ClrText:"OPTION 3":
"B"?->B:"R="▲ (triangle - shift+prgm and F5)

Lbl 3:O≠4=>Goto 4:ClrText:"OPTION 4":
"B"?->B:"R="▲ (triangle - shift+prgm and F5)

Lbl 4:ClrText:"OPTION 5":
"B"?->B:"R="▲ (triangle - shift+prgm and F5)

Edited by pan.gejt, 20 April 2016 - 03:11 PM.

### #3 joshp689

joshp689

Newbie

• Members
• 4 posts

• Calculators:
Prizm

Posted 20 April 2016 - 11:53 PM

I got that program to work. but I need help for another thing.

I want it to go to a label based on two different inputs

something like

```Lbl 0
"Option 1"
"Option 2"
?->A

If A=1
Then Goto 1
If A=2
Then Goto 1

Lbl 1
"Option 1"
"Option 2"
?->B

If A=1 and B=1
Then Goto 2
If A=1 and B=2
Then Goto 3

```

I think my calculator is "forgetting" the value of A when at the B input.

Edited by joshp689, 20 April 2016 - 11:54 PM.

### #4 Viliami

Viliami

• Moderator
• 96 posts
• Gender:Male
• Location:New Zealand
• Interests:C++ - OpenGL,SDL
Python - Pygame
Java - SFML
C - Casio SDK

• Calculators:
FX-9750 GII upgraded to FX-9860 GII

Posted 21 April 2016 - 09:26 AM

I don't know if it's it's the same as the BASIC synntax in fx-9860giis, but if it is, you're missing the ENDIFs or the ELSE.

Nevermind, I read some Prism BASIC code, the ENDIF is not needed.

Edited by Viliami, 21 April 2016 - 09:34 AM.

### #5 pan.gejt

pan.gejt

Casio Freak

• Members
• 195 posts
• Gender:Male
• Location:CZ

• Calculators:
.

Posted 21 April 2016 - 09:38 AM

Is this code correct? Because I don't understand why do you need different values of A for the same jump. In such case you can assign any value to A and omit the code.

If A=1
Then Goto 1
If A=2
Then Goto 1

----------------------------------------------------

A≠1=>Goto 2:"MENU 2":"INPUT OPTION 1-2"?->B:       ;if A=1 the program continues to Menu 2, if A=2 the program jumps to the beginning for the new input

A≠B=>Goto 1:put something here for A=B=1:                ;if A=1 and B=1 the program continues, if A=1 and B=2 the program jumps to Lbl 1

Lbl 1:put something here for A=1 and B=2:Goto 2

Edited by pan.gejt, 21 April 2016 - 10:07 AM.

### #6 Viliami

Viliami

• Moderator
• 96 posts
• Gender:Male
• Location:New Zealand
• Interests:C++ - OpenGL,SDL
Python - Pygame
Java - SFML
C - Casio SDK

• Calculators:
FX-9750 GII upgraded to FX-9860 GII

Posted 21 April 2016 - 09:50 AM

The program is also going to flow to label 1 naturally, so the if statements checking for A=1 and A=2 are not needed.

### #7 frankmar98

frankmar98

Casio Freak

• Moderator
• 127 posts
• Gender:Male
• Location:Spain
• Interests:Science, programming

• Calculators:
CFX-9970G
Graph 90+E (fx-GC50)
fx-9860G SD
HP Prime
TI-84+ CE-T
x2 TI-83+
TI-81
fx-4800p, fx-3650PII
fx-991SPX, fx-991ES PLUS, fx-100W

Posted 21 April 2016 - 05:00 PM

I think, like Viliami you´re missing the endifs.

You must look at the user´s guide the syntax of the if then else endif sentence.

To output somethig in Casio Basic, you have to put a little triangle in the end.  PRINT(X) is in casio basic: X(output triangle)

You can find this triangle in Shift Vars (Prgm)

Luck!

### #8 Forty-Two

Forty-Two

Casio Overlord

• Deputy
• 528 posts
• Gender:Male
• Location:Well, The sign says "You are here"...

• Calculators:
Casio fx-CG10 Prizm
Casio fx-9860GII
TI-84+ SE

Posted 21 April 2016 - 05:53 PM

This post was in the wrong section so i moved it.

I've moved the replies from the old topic to this thread, and deleted the old topic.

### #9 joshp689

joshp689

Newbie

• Members
• 4 posts

• Calculators:
Prizm

Posted 22 April 2016 - 04:54 AM

My problem is arguing two variables.

The

```If A=1
Goto 1
If A=2
Goto 1
```

is only display the selected option and to move along to the next menu, after the second menu (Lbl 1). I know I should've added the display part to avoid the confusion.

The program moves to the

```If A=1 and B=1
Then Goto 2
If A=1 and B=2
Then Goto 3
```

and this needs to move to certain labels based on the combination of "A" and "B". In C++ I would do something like "if A=1 && B=1" but I don't know to how on my Prizm.

Edited by joshp689, 22 April 2016 - 04:58 AM.

### #10 Viliami

Viliami

• Moderator
• 96 posts
• Gender:Male
• Location:New Zealand
• Interests:C++ - OpenGL,SDL
Python - Pygame
Java - SFML
C - Casio SDK

• Calculators:
FX-9750 GII upgraded to FX-9860 GII

Posted 23 April 2016 - 04:14 AM

To type the And logical operator press the button then select LOGIC and then select AND. That is also where you find OR, NOT and XOR.

If it isn't showing make sure that COMP is the mode in the setup menu. You can reach the setup menu by pressing and then  in the maths add-in.

Edited by Viliami, 23 April 2016 - 04:16 AM.

#### 0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users