Typing For convenience as a scripting language, variables do not need to be typed - any variable can be assigned any value. Some people prefer typing, and in larger applications it can expose coding problems, so typing can be used if desired. Typing can be turned on (by setting a special global variable), and once this is done all assignments must be to typed variables, or an error will be thrown.Furthermore, even with this turned off, any variable including a type in its declaration will have typing enforced on assignment. Evaluation Besides the API, there are library functions eval(COMMAND) and meval(COMMAND) that will interpret a given string in the current environment, or in the current environment and frame as either a function or a macro (that is, with the local variables and object still in scope.) Interactive When run as an application without a file argument, IC accepts interactive input, reading and interpreting commands typed into it. This is equivalent to interpreting files: functions and classes can be defined, variables declared, and so on. |
|