syntax error but its from HP Prime Exercises..what up with that?
|
11-18-2019, 09:52 PM
Post: #1
|
|||
|
|||
syntax error but its from HP Prime Exercises..what up with that?
The error is in ""M; dont know why?
anyone know why? EXPORT CESAR() BEGIN local n; LOCAL S,M,K; ””M; //The user is asked to enter the encrypted word INPUT(n,”Insert in quotation marks”,”Encrypted word”); SIZE(n)S; FOR K FROM 1 TO S DO //This time we shift by 3 letters backwards M+CHAR(ASC(MID(n,K,1))-3)M; END; PRINT(M); END; |
|||
11-18-2019, 11:45 PM
(This post was last modified: 11-18-2019 11:46 PM by pinkman.)
Post: #2
|
|||
|
|||
RE: syntax error but its from HP Prime Exercises..what up with that?
Hi,
The arrows (sto) are missing, the quotation marks are not the right ones (maybe because of your PC keyboard), and the INPUT command is used the wrong way to input strings. Where did you find this example? Here is my proposed correction: Code:
|
|||
11-18-2019, 11:50 PM
Post: #3
|
|||
|
|||
RE: syntax error but its from HP Prime Exercises..what up with that?
I found it in publication:
EXERCISES HP Prime by:Preparation: MORAVIA Education, a division of MORAVIA Consulting Ltd. http://www.moravia-consulting.com Creation and copyright: Mickaël Nicotera, http://mic.nic.free.fr/ More documents at: http://www.hp-prime.com Date of issue: 06.2014 The language changed that much since 22014? thank you. |
|||
11-19-2019, 01:09 AM
Post: #4
|
|||
|
|||
RE: syntax error but its from HP Prime Exercises..what up with that?
(11-18-2019 11:50 PM)tom234 Wrote: I found it in publication: No, i suspect the font is not embedded/installed and whatever you are viewing with shows nothing for unknown characters. TW Although I work for HP, the views and opinions I post here are my own. |
|||
11-19-2019, 11:49 AM
Post: #5
|
|||
|
|||
RE: syntax error but its from HP Prime Exercises..what up with that?
Your line is see as input in HP Prime for Alegerbra and in other programs like dist2:
INPUT({{N,[2]}}, "Insert without quotation marks", "Encrypted word"); TY |
|||
11-19-2019, 01:03 PM
(This post was last modified: 11-19-2019 01:04 PM by tom234.)
Post: #6
|
|||
|
|||
RE: syntax error but its from HP Prime Exercises..what up with that?
EXPORT AA()
BEGIN LOCAL A,L; L:=[]; (this line has a error inside the box is this syntax out of date?) REPEAT REPEAT A:=GETKEY; UNTIL A!=-1; L:=CONCAT(L,A); UNTIL ISKEYDOWN(48); RETURN L; END; Symbolic computation and Mathematics with the calculator HP Prime Renée De Graeve Lecturer at Grenoble on page 497 Is this texts words out of date with software programing lauguage in use now? |
|||
11-19-2019, 01:28 PM
Post: #7
|
|||
|
|||
RE: syntax error but its from HP Prime Exercises..what up with that?
Are only empty lists allowed?
Yes: { } No: [ ] (empty vectors) |
|||
11-19-2019, 01:37 PM
Post: #8
|
|||
|
|||
RE: syntax error but its from HP Prime Exercises..what up with that? | |||
11-19-2019, 03:32 PM
Post: #9
|
|||
|
|||
RE: syntax error but its from HP Prime Exercises..what up with that?
It is not an HP book nor site.
Talk to the author. TW Although I work for HP, the views and opinions I post here are my own. |
|||
11-19-2019, 08:18 PM
Post: #10
|
|||
|
|||
RE: syntax error but its from HP Prime Exercises..what up with that? | |||
11-19-2019, 08:48 PM
(This post was last modified: 11-19-2019 08:51 PM by StephenG1CMZ.)
Post: #11
|
|||
|
|||
RE: syntax error but its from HP Prime Exercises..what up with that?
You will find useful information within the user guides and tutorials here (note that not all is official HP) :
https://www.hpmuseum.org/forum/thread-81...ddie+shore Stephen Lewkowicz (G1CMZ) https://my.numworks.com/python/steveg1cmz |
|||
11-19-2019, 10:03 PM
Post: #12
|
|||
|
|||
RE: syntax error but its from HP Prime Exercises..what up with that? | |||
11-20-2019, 01:13 AM
Post: #13
|
|||
|
|||
RE: syntax error but its from HP Prime Exercises..what up with that?
There are also a lot of built in progam examples in the calculator itself ready to load in and run/study. In the "New" screen when making a program, press "Example" to pick one.
TW Although I work for HP, the views and opinions I post here are my own. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)