Jump to content

- - - - -

Ouput multiple variables, or mix them with text

  • Please log in to reply
2 replies to this topic

#1 Kokesh



  • Members
  • Pip
  • 1 posts

  • Calculators:
    FX-9750G Plus, FX-82ES Plus

Posted 01 November 2017 - 06:13 PM

I would output the following:
"RESULT - "+x
On Fx-9750G Plus. How can I do that? I've tried to fins Str on this device, but didn't find it.




  • Members
  • Pip
  • 25 posts
  • Gender:Male
  • Location:idunno, idaho

  • Calculators:
    Classpad 300
    Classpad 330
    Classpad 400

Posted 02 November 2017 - 12:10 AM

What is +x? Is that supposed to be a number? If so, use NumToStr to convert the number to a string.

Then use StrJoin to join those 2 strings together. Then print the string. Suppose X = 5.


Let use say that X is the number:

NumToStr X,"fix2",x


What I have done is I have taken the number that is in variable X (upper case) and told it to output the number with 2 decimal places to the variable x (lower case) as a string. I like to use upper/lower case so I do not overwrite the original. Using the same letter lets me remember where the original came from. 


As for "fix2". Yes, the quotes are needed. Unfortunately, you are limited to using fix or scientific for output. You cannot use "normal" for outputting. Yeah, it becomes a headache if you do not want decimals because you must then trim your strings using TrimLen, TrimLeft, etc and perhaps create some more math routines to get it to do what you want.



StrJoin "Result - ", x, x


This joins the string "Result - " and the string in variable x (lower case) and then shoves it back into the variable x and over writes the previous string. You can also send it to a different variable if you like wasting variables.



Print x


Your result should be what I think you desire.

Result - 5.00

#3 piu58


    Casio Fan

  • Members
  • PipPip
  • 30 posts
  • Gender:Male

  • Calculators:
    Casio fx-9860G

Posted 28 November 2017 - 08:00 AM

You may output more than one variable as List:



$ is the stop triangle. I cannot use text in this environement with my fx-9860.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users