cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
gail_massari
Community Manager Community Manager
Expression Handling Functions: Part I - Unraveling the Expr(), NameExpr(), Eval(), ... Conundrum

This article originally appeared in JMPer Cable, Issue 26, Winter 2010

by Joseph Morgan joseph.morgan, JMP Senior Software Developer, SAS

Note: The JSL in this article is compatible with JMP 9 and later.  Accordingly, the code may not reflect the power of JSL introduced with versions of JMP released subsequent to JMP 9.


Introduction

Many beginning and intermediate JMP Scripting Language (JSL) programmers are unaware of the power of abstraction available from JSL expressions. Such meta-programming constructs are not always available in widely used programming languages such as C++ but are commonly found in functional programming languages such as Lisp.

As it turns out, such constructs are particularly useful when the application being developed is complex. They facilitate process abstraction. Robert Sebesta (1999) describes abstraction:

“The ability to define and then use complicated structures or operations in ways that allow many of the details to be ignored. The degree of abstraction allowed and the naturalness of its expression is important.”

This article attempts to unravel the mystery surrounding JSL expression handling functions and show how such functions can be used to solve nontrivial JSL programming challenges.

Concluding Comments

The primary purpose of these examples is to illustrate the use of several expression-handling functions. A secondary purpose is to point out common errors and misunderstandings that JSL programmers sometimes experience when attempting to use these functions. Hopefully, we have partly achieved that objective.

References

SAS Institute, Inc. (2008), JMP Scripting Guide, Cary, NC: SAS Institute, Inc.

Sebesta, Robert M. (1999), Concepts of Programming Languages, Addison Wesley, Reading, MA.

Last Modified: Nov 9, 2016 5:12 AM
Comments