Post Reply 
RETURN instruction
02-18-2016, 04:35 PM (This post was last modified: 02-18-2016 05:19 PM by compsystems.)
Post: #1
RETURN instruction
in all the languages I've programmed the RETURN instruction end the function
Why not the case in the language of hpprime?

Code:
#cas
prg1(x,y):=
BEGIN
  a:=seq(x^2,x,1,3);
  return a;
   √(x^2+Y^2);  
END;
#end

prg1(3,4) [ENTER] => [1,4,9] OK & not 5
Find all posts by this user
Quote this message in a reply
02-18-2016, 05:02 PM
Post: #2
RE: RETURN instruction
This is a bug. In the meantime, use RETURN instead of return.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
02-18-2016, 05:07 PM
Post: #3
RE: RETURN instruction
(02-18-2016 05:02 PM)Han Wrote:  This is a bug. In the meantime, use RETURN instead of return.
=[
reserved words, should not be sensitive to case-sensitive, this is a bad programming practice, do not know when to use each instruction
I recommend that this form reconsider the firmware and only operate with out case sensitive

Do you agree?
+1
Find all posts by this user
Quote this message in a reply
02-19-2016, 01:31 PM
Post: #4
RE: RETURN instruction
Yes, but there are some commands where one is for CAS and the other for HOME environet. They are distinguishable by lower/uppercase.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)