Omnimaga
Calculator Community => TI Calculators => TI-BASIC => Topic started by: Kiligolo on October 22, 2010, 02:44:54 pm
-
Bonjour,
Je suis en train de programmer et je ne sais pas comment "transformer" (ou mettre) une variable dans une chaine. ???
Quelqu'un pourrais me dire comment on fait, merci d'avance! :)
Hello,
I am programming and I do not know how to save a variable in a string. ???
Somebody could me say how to do, thanks! :)
-
transformer une variable dans une chaine?
Une variable qu'est'un numero pour un chaine?
-
J'aimerais enregistrer une variable (A par exemple) dans une chaine (Str1 par exemple). Mais je ne connais que la fonction expr( qui fait l'inverse :( . Je ne sais pas si c'est possible mais je me rappelle avoir fait ceci...
I would like to save a variable (A for example) in a string (Str1 for example). But I know only the function expr( which does unlike :( . I do not know if it is possible but I remember doing this...
-
Si tu veux declarer une chaine fais comme ça:
"Salut, monde!" (STO->) str1
----------------------------OU----------------------
Input "", str2
Disp str2
Mais je ne comprehends pas ce que tu dis trés bien :S
-
Oh ok. ;D
Je crois que je ne me suis pas très bien exprimé...
Bon j'ai ceci comme code:
Input A
...
//Et là je voudrais faire une chose comme A->Str0 mais ERR:DATA TYPE...
Oh ok. ;D
I think I am not very well expressed...
So here is the program:
Input A
...
//Here, I would like to do something like A->Str0 but ERR:DATA TYPE...
-
Tu dois faire:
Input "", A
// Pour utiliser chaines
Input A
//Pour utiliser numeros
-
I would like to change a number into a string.
I know the input fonction. The code:
Input "NUMERATEUR:",A
Input "DENOMINATEUR:",B
Output(5,1,"CALCUL
lcm(A,B->C
//Here, I want to change the variable A into Str0
//The same with B and C
I am French so my English it a bit bad. ;D
-
oooh, transformer un numero pour une chaine:
:{0,1→L₁
:{0,N→L₂
:LinReg(ax+b) Y₁
:Equ►String(Y₁,Str1
:sub(Str1,1,length(Str1)-3→Str1
-
Are you sure? The calculator say ERR:DIM MISMATCH on "linReg(ax+b) Y1"... :(
-
Personne pour m'aider ? :'(
Nobody is here to help me? :'(
-
oooh, transformer un numero pour une chaine:
:{0,1→L₁
:{0,N→L₂
:LinReg(ax+b) Y₁
:Equ►String(Y₁,Str1
:sub(Str1,1,length(Str1)-3→Str1
This is indeed the way to convert a number into a string, and this code should work. Are you sure you entered it correctly?
-
It works!
Think you for your help! :D
-
Désolé j'aimerais bien aider mais malheureusement je ne suis pas très connaisseur en Axe et ayant quitté temporairement la programmation TI ça ne m'aide pas beaucoup :(
-
oooh, transformer un numero pour une chaine:
:{0,1→L₁
:{0,N→L₂
:LinReg(ax+b) Y₁
:Equ►String(Y₁,Str1
:sub(Str1,1,length(Str1)-3→Str1
This is indeed the way to convert a number into a string, and this code should work. Are you sure you entered it correctly?
Yeah, this works very well for me too, but I see he already got it :)