Posté le 20/12/2023 17:50
Planète Casio v4.3 © créé par Neuronix et Muelsaco 2004 - 2024 | Il y a 90 connectés | Nous contacter | Qui sommes-nous ? | Licences et remerciements
Planète Casio est un site communautaire non affilié à Casio. Toute reproduction de Planète Casio, même partielle, est interdite.
Les programmes et autres publications présentes sur Planète Casio restent la propriété de leurs auteurs et peuvent être soumis à des licences ou copyrights.
CASIO est une marque déposée par CASIO Computer Co., Ltd
Citer : Posté le 20/12/2023 17:54 | #
Tu n'as pas fermé ton While 1 par un WhileEnd je pense que c'est pour ça
Citer : Posté le 20/12/2023 17:56 | #
Mais.... comment j'ai pu faire une telle erreur merci, ca marche!
Citer : Posté le 21/12/2023 08:20 | #
C'est à cause des habitudes prises en python.
Les fins d'indention ferment les if while for etc
Citer : Posté le 21/12/2023 14:29 | #
Oui je crois que c'est pour ca. En plus, j'ai pris du temps a comprendre que si tu mets 4 conditions, il faut mettre 4 IfEnd
Citer : Posté le 21/12/2023 15:27 | #
What kind of error message did you get in C.Basic? I was confused because you should get the "While w/o WhileEnd"/"Missing WhileEnd" message instead of just "syntax error".
Citer : Posté le 21/12/2023 16:14 | #
Actually, when there is a missing WhileEnd or IfEnd, it shows a Syntax ERROR. But maybe we don't have the same calculator model. I have a graph 35+e.
Citer : Posté le 21/12/2023 20:50 | #
Ah, I kind of figured out why your error message wasn't "Missing WhileEnd". Apparantly it is only triggered when running "While (false)" as it looks for and jumps to WhileEnd to skip the while loop. Here you used "While 1" in which C.Basic just "labels its position and waits until reaching WhileEnd for looping" without actually looking for WhileEnd immediately (not 100% sure though). This might be the way the syntax system in C.Basic works (to speed up interpretion) and as such it's so lenient that even codes like "If 0ThenA->BElseA->CIfEnd" is allowed and functional x).
Interestingly you stated your cursor is located within StrMid() when the error pop-up shows up, which indicates something went wrong on StrMid() and not the while loop, but I don't see any syntax issues in this part. Moreover, simply running "WhileEnd" or "IfEnd" does not show any error pop-up. I thought you got the "Syntax ERROR" pop-up at first but this seems incorrect. Maybe you mean your calc shows erroneous results on the screen after running the codes?
Citer : Posté le 21/12/2023 22:33 | #
I understand your reasoning and it popped up me a Syntax ERROR. And then, when I added the WhileEnd, it worked perfectly. So I don't know
Citer : Posté le 09/01/2024 19:26 | #
Ah, I kind of figured out why your error message wasn't "Missing WhileEnd". Apparantly it is only triggered when running "While (false)" as it looks for and jumps to WhileEnd to skip the while loop. Here you used "While 1" in which C.Basic just "labels its position and waits until reaching WhileEnd for looping" without actually looking for WhileEnd immediately (not 100% sure though). This might be the way the syntax system in C.Basic works (to speed up interpretion) and as such it's so lenient that even codes like "If 0ThenA->BElseA->CIfEnd" is allowed and functional x).
Interestingly you stated your cursor is located within StrMid() when the error pop-up shows up, which indicates something went wrong on StrMid() and not the while loop, but I don't see any syntax issues in this part. Moreover, simply running "WhileEnd" or "IfEnd" does not show any error pop-up. I thought you got the "Syntax ERROR" pop-up at first but this seems incorrect. Maybe you mean your calc shows erroneous results on the screen after running the codes?
EDIT: I changed the name of the topic.