Post Reply 
Tips: Declaring symbolic variables
02-04-2018, 04:06 PM (This post was last modified: 02-04-2018 04:09 PM by compsystems.)
Post: #1
Tips: Declaring symbolic variables
PHP Code:
#cas
fa(x):=
BEGIN
  local y

  return 
x*y// "Unitialized local variable y"
END:;
#end 

fa(z) returns "Unitialized local variable y"

PHP Code:
#cas
fb(x):=
BEGIN
  local y
;  purge(y//  purge = does not contain any object == y as symvar
  
return x*y
END:;
#end 

fb(z) returns y*z

PHP Code:
#cas
fc(x):=
BEGIN
  local y
;  assume(y,symbol); // y as symvar
  
return x*y
END:;
#end 

fc(z) returns y*z

PHP Code:
#cas
fd(x):=
BEGIN
  local y
;  y=assume[expression]; // y as symvar
  
return x*y
END:;
#end 

fd(z) returns y*z

http://www.hpcalc.org 20 years online
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




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