The # operator protects the contents of an expression from the evaluator. The ` operator does the same thing, but allows for evaluation of sub-expressions. Any sub-expression tagged with @ operator that occurs within a back-ticked (`) expression will be evaluated.
![]() | Any error messages involving the @ operator will use the expression _comma_. This is because the @ operator in Gamma corresponds to a comma operator (,) in Lisp syntax. When a Gamma expression is passed to Lisp, the @ operator is converted to a comma. But if the Lisp comma operator is ever read back into Gamma, it is represented by the symbol _comma_ to avoid confusion with the (,) operator used in Gamma function calls. |
Gamma> name = "John";
"John"
Gamma> name;
"John"
Gamma> #name;
name
Gamma> x = 4;
4
Gamma> list (1,x);
(1 4)
Gamma> #list (1,x);
(list 1 x)
Gamma> list (1,#x);
(1 x)
Gamma> `list (1,x);
(list 1 x)
Gamma> `list (1,@x);
(list 1 4)
Gamma>
See the Automatically Change SP Value section of the PID Emulator chapter, or the Making Scales and Spin Buttons section of the GTK Functions chapter (Tutorial One), or the Monitor Window section or the Callback Functions section of the Photon Functions chapter (Tutorial One), or the GTK: Building Control Buttons section of the Controller Functions chapter (Tutorial Two) in the Cogent Tools Demo and Tutorials book for examples of these operators used in context.