Path Expressions

Using Path Expressions for Constants

Path expressions are most commonly used as a way to specify a slot using a constant. For instance:

func()
begin
   constant kSlotToUse := 'theSlot;
   frame.(kSlotToUse) := 5;
   ...
   total := total + frame.(kSlotToUse)
   ...
end;
This use of path expressions is especially nice if you have an application-wide constant that is used in many different methods.


An online version of Programming for the Newton using Macintosh, 2nd ed. ©1996, 1994, Julie McKeehan and Neil Rhodes.

Last modified: 1 DEC 1996