该帮助的版本不再更新,请参见https://www.jmp.com/support/help/zh-cn/15.2 获取最新的版本.


When you reference a column name using As Name(), and Names Default To Here( 1 ) is set, JMP returns a variable reference. That reference is then processed using the standard reference rules.
In the following example, there is no height variable in the Here: scope, so JMP returns an error.
Open( "$SAMPLE_DATA/Big Class.jmp" );
As Name( "height" )[3]; // converts height to a variable reference
Use As Column() instead of As Name():
Open( "$SAMPLE_DATA/Big Class.jmp" );
As Column( "height" )[3]; // converts height to a data column reference
Explicitly scope height with As Name():
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt:( As Name( "height" ) )[3]; // scopes height as a data column reference
These scripts return 55, the value of height in the third row of Big Class.jmp.