HP Forums

Full Version: RETURN instruction
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
This is a bug. In the meantime, use RETURN instead of return.
(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
Yes, but there are some commands where one is for CAS and the other for HOME environet. They are distinguishable by lower/uppercase.
Reference URL's