Difference between revisions of "Ro/Rodin/Alte exemple"
< Ro/Rodin
Jump to navigation
Jump to search
Tomjaguarpaw (talk | contribs) (Deleting page that hasn't been updated for over 10 years) |
|||
Line 1: | Line 1: | ||
− | [[Category:Ro]][[Category:Ub.Ro]][[Category:Rodin]] |
||
− | |||
− | == Aceasta pagina este depasita tehnic, Rodin a ajunsese in 2009 la versiunea: [[Experiment Exp 12]] == |
||
− | Vedeti: [[Rodin/Download]] iar in arhiva cu programe gasiti si exemple de programe, pe categorii de instructiuni. |
||
− | |||
− | == Program incercat in timpul testarii RodinV082b. == |
||
− | Se observa cateva probleme. |
||
− | <haskell> |
||
− | { text "Dati lungimea vectorului"; |
||
− | |||
− | citeste n; |
||
− | |||
− | pentru (fie x=0; x<n; fie x=x+1) |
||
− | |||
− | fie v[x]=0; |
||
− | |||
− | pentru (fie x=0; x<n; fie x=x+1) |
||
− | |||
− | {citeste y;fie v[x]=y;}; |
||
− | |||
− | fie xmin=0; |
||
− | |||
− | fie xmax=0; |
||
− | |||
− | pentru (fie x=0; x<n; fie x=x+1) |
||
− | |||
− | {daca (xmin>v[x]) atunci fie xmin=v[x]; |
||
− | |||
− | altfel fie xmin=xmin;}; |
||
− | |||
− | pentru (fie x=0; x<n; fie x=x+1) |
||
− | |||
− | {daca (xmax<v[x]) atunci fie xmax=v[x]; |
||
− | |||
− | altfel xmax=xmax;}; |
||
− | |||
− | text "Minimul din sir este"; |
||
− | |||
− | scrie xmin; |
||
− | |||
− | text "Maximul din sir este"; |
||
− | |||
− | scrie xmax; |
||
− | |||
− | citeste j; |
||
− | |||
− | }; |
||
− | </haskell> |
||
− | |||
− | Beta tester: Cristina (88). (Care de altfel a lucrat cam peste tot conform indicatiilor si posibilitatilor versiunii V082b.) |
||
− | |||
− | Multumesc mult pentru exemplu. Un exemplu care NU functioneaza e mai util decat unul care functioneaza fiindca ne spune ce bug-uri mai avem de cautat. |
||
− | |||
− | == To do == |
||
− | |||
− | * O instructiune "nop" sau "skip". Banal. |
||
− | * daca - cu o singura ramura. Rezolvat ! |
||
− | * pentru - de corectat problema de sintaxa. Rezolvat ! |