Page 1 sur 1

Problem programmation

Message non luPosté: 05 Fév 2016, 15:48
de mark
Code: Tout sélectionner
Prgm
Dialog
Request "CORPO N.",asd,0
Request "CERNIERA",asd12
EndDlog

Dialog
Request "POLO CORPO"&asd&"",asdf5
Request "BIELLA",adsg
EndDlog

Dialog
Request "Ux",aux1,0
Request "Uy",aux2,0
Request "Uz",aux3,0
EndDlog

Dialog
Request "wx",aux4,0
Request "wy",aux5,0
Request "wz",aux6,0
EndDlog

Dialog
Request "x",aux7,0
Request "y",aux8,0
Request "z",aux9,0
EndDlog
Pause "BIELLA = U"&asd&"("&asd12&") ° "&adsg&"=0"
Pause "U"&asd&"("&asd12&")={"&aux1&"+"&aux2&"+"&aux3&"}+{"&aux4&"+"&aux5&"+"&aux6&"} „ "&asdf5&""&asd12&""
expr(aux1)→aux1
expr(aux2)→aux2
expr(aux3)→aux3
expr(aux4)→aux4
expr(aux5)→aux5
expr(aux6)→aux6
expr(aux7)→aux7
expr(aux8)→aux8
expr(aux9)→aux9

Pause "PRODOTTO VETTORIALE"
crossP({aux4,aux5,aux6},{aux7,aux8,aux9})→regt
Pause regt
Disp "PRODOTTO VETTORIALE"
Pause "CON TRASLAZIONE"
{aux1,aux2,aux3}+regt→xxx
Pause xxx
DelVar aux1,aux2,aux3,aux4,aux5,aux6,aux7,aux8,aux9,regt
Disp "SCRIVO LA DISTANZA"
Pause "DELLA BIELLA "&adsg&""
Dialog
Title "DISTANZA"
Request "x1",aux10,0
Request "y1",aux11,0
Request "z1",aux12,0
EndDlog
expr(aux10)→aux10
expr(aux11)→aux11
expr(aux12)→aux12
Disp "Risolvo"
Pause "U"&asd&"("&asd12&") ° "&adsg&" =0"
dotP(xxx,{aux10,aux11,aux12})→xcv
Pause xcv
expr("ux"&asd&"")→aux1
expr("uy"&asd&"")→aux2
expr("uz"&asd&"")→aux3
expr("wx"&asd&"")→aux4
expr("wy"&asd&"")→aux5
expr("wz"&asd&"")→aux6


Code: Tout sélectionner
exp►list(solve(xcv=0,aux4),aux4)→fgh
Pause fgh
exp►list(solve(xcv=0,aux5),aux5)→fgk
Pause fgk
exp►list(solve(xcv=0,aux6),aux6)→fgv
Pause fgv
exp►list(solve(xcv=0,aux1),aux1)→fgc
Pause fgc
exp►list(solve(xcv=0,aux2),aux2)→fkv
Pause fkv
exp►list(solve(xcv=0,aux3),aux3)→fjc
Pause fjc
EndIf
Pause {aux1,aux2,aux3}+{aux4,aux5,aux6} ^ asdf5&M|aux1->fgc and aux2->fkv and aux3->fjc and aux4->fgh and aux5->fgk and aux6->fgv
Pause fgv
EndPrgm



xcv is an expression and solve xcv in aux1,aux2,aux3,aux4,aux5 and aux6 but i get {} ..... why ?
And i also want to take the results and replace them in the following formula: {aux1,aux2,aux3} + {aux4,aux5,aux6} ^ asdf5&M|aux1->fgc and aux2->fkv and aux3->fjc and aux4->fgh and aux5->fgk and aux6->fgv
and see the formula in the home screen.

Re: Problem programmation

Message non luPosté: 08 Fév 2016, 10:04
de Bisam
You have many bad habits in programming.
First of all, naming all your variables the same make them unusable !! How can you know what they mean, especially when the definition changes from one part of your program to another ?

I don't really understand what you're trying to do (you should give an example, with a photo if you have one) but your last lines can't work because you can't solve a same expression to each of its variables separately ! And you can't write an expression something|foo=bar as you did.

Once again, give more explanations. I'm sure your code is way more complicated that it should.