HP Forums

Full Version: Tips: Declaring symbolic variables
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
Reference URL's