cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
hogi
Level XIII

Does Head evaluate its argument?

From , I learned that there are some functions which evaluate their argument and others which don't:

 

hogi_0-1709477067669.png

 

I wondered about Head. Here everything looks logic ...

f= Expr(x=2);
Substitute(NameExpr(f),Expr(x), Expr(y));
Head(f);

Head is not like Substitute, I can directly use the function name as an argument  - and Head returns the head of the expression: Assign() 

 

After checking some other functions which "don't evaluate their argument":

Expr(x=2); // x=2
Name Expr(x=2); // x=2

let's check the result for

Head(x=2)

which is "2" - i.e. the result after evaluating the argument?!?! why is it not assign()?

11 REPLIES 11
hogi
Level XIII

Re: Does Head evaluate it's argument?

#ExpressionInspector

 

hogi
Level XIII

Re: Does Head evaluate it's argument?

Another question:

Why does Type evaluate its argument?

 

Type(Char(1)) // String !!

Recommended Articles