varp(expression) → boolean

The subroutine varp takes an expression as argument and determines whether or not it is a variable. If the specified expression is a variable, varp returns true>; otherwise, it returns false.

Call: varp('X') Exit: true Call: varp('X23') Exit: true Call: varp('_') Exit: true Call: varp('x23') Exit: false Call: varp(['f','a','b']) Exit: false

A variable is a string of alphanumeric characters and underscores beginning with either an upper case letter or an underscore. Note that it is common practice not to use upper case letters in variables except as the first character. (This is to allow interoperation with implementations that are case-independent and, therefore, do not distinguish upper and lower case letters).

Comments and complaints to genesereth@stanford.edu.